Files
react-navigation/jest/setup.js
2020-01-01 13:12:41 +01:00

10 lines
426 B
JavaScript

const error = console.error;
console.error = (...args) =>
// Supress error messages regarding error boundary in tests
/(Consider adding an error boundary to your tree to customize error handling behavior|React will try to recreate this component tree from scratch using the error boundary you provided|Error boundaries should implement getDerivedStateFromError)/m.test(
args[0]
)
? void 0
: error(...args);