nocobase/jest.setup.ts
ChengLei Shao 86065fa208
feat: error handle middleware (#214)
* feat: error handle middleware

* feat: application error handler

* feat: handle with sequelizeValidationError

* fix: test

* fix: test
2022-03-02 12:50:15 +08:00

14 lines
268 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import prettyFormat from 'pretty-format';
global['prettyFormat'] = prettyFormat;
jest.setTimeout(300000);
// 把 console.error 转换成 error方便断言
(() => {
const spy = jest.spyOn(console, 'error');
afterAll(() => {
spy.mockRestore();
});
})();