amis-rpc-design/libs/amis/packages/amis-formula/__tests__/jest.setup.js
2023-10-07 19:42:30 +08:00

23 lines
527 B
JavaScript

const originalWarn = console.warn.bind(console.warn);
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;
});