Skip to content

Instantly share code, notes, and snippets.

@gugiserman
Last active August 9, 2020 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gugiserman/b6e085e9e46b0f697e1297ce310a65b2 to your computer and use it in GitHub Desktop.
Save gugiserman/b6e085e9e46b0f697e1297ce310a65b2 to your computer and use it in GitHub Desktop.
Ignore React componentWillReceiveProps has been renamed warn in tests
// 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