mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
18 lines
424 B
JavaScript
18 lines
424 B
JavaScript
const originalWarn = console.warn.bind(console.warn);
|
|
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;
|
|
});
|