mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
18030b5415
* chore: 调整测试用例 * chore: 调整测试用例 * 补充测试用 * chore: 修复测试用例报错 * chore: 修复测试用例报错 * 更新 snapshot
23 lines
564 B
JavaScript
23 lines
564 B
JavaScript
const originalWarn = console.warn.bind(console.warn);
|
|
require('@testing-library/jest-dom');
|
|
require('moment-timezone');
|
|
const moment = require('moment');
|
|
moment.tz.setDefault('Asia/Shanghai');
|
|
|
|
global.beforeAll(() => {
|
|
console.warn = msg => {
|
|
// warning 先关了,实在太吵。
|
|
// const str = msg.toString();
|
|
// if (
|
|
// str.includes('componentWillMount') ||
|
|
// str.includes('componentWillReceiveProps')
|
|
// ) {
|
|
// return;
|
|
// }
|
|
// originalWarn(msg);
|
|
};
|
|
});
|
|
global.afterAll(() => {
|
|
console.warn = originalWarn;
|
|
});
|