mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-01-12 22:51:18 +08:00
chore: supress error messages regarding error boundary in tests (#28)
This commit is contained in:
committed by
Michał Osadnik
parent
78ccf49627
commit
75d356f3e9
9
jest/setup.js
Normal file
9
jest/setup.js
Normal file
@@ -0,0 +1,9 @@
|
||||
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/m.test(
|
||||
args[0]
|
||||
)
|
||||
? void 0
|
||||
: error(...args);
|
||||
@@ -80,6 +80,7 @@
|
||||
"testRegex": "/__tests__/.*\\.(test|spec)\\.(js|tsx?)$",
|
||||
"transform": {
|
||||
"^.+\\.(js|ts|tsx)$": "babel-jest"
|
||||
}
|
||||
},
|
||||
"setupFiles": ["<rootDir>/jest/setup.js"]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user