Last active
August 9, 2020 23:32
-
-
Save gugiserman/b6e085e9e46b0f697e1297ce310a65b2 to your computer and use it in GitHub Desktop.
Ignore React componentWillReceiveProps has been renamed warn in tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jest.setup.js | |
const consoleWarn = console.warn | |
delete console.warn | |
console.warn = (...args) => { | |
const message = args[0] | |
if (message.indexOf('componentWillReceiveProps has been renamed') !== -1) { | |
return false | |
} | |
return consoleWarn(...args) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment