nocobase2/jest.setupAfterEnv.ts

14 lines
268 B
TypeScript
Raw Normal View History

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