fix(tests): update deprecation warning for react 16.10

This commit is contained in:
Łukasz Mierzwa
2019-09-28 19:13:36 +01:00
parent a705fc039c
commit ce82ab3c86

View File

@@ -17,7 +17,7 @@ global.fetch = require("jest-fetch-mock");
// ensure that all console messages throw errors
for (const level of ["error", "warn", "info", "log", "trace"]) {
// https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#new-deprecations
const reactDeprecationWarning = /.*has been renamed, and is not recommended for use\. See https:\/\/fb.me\/react-async-component-lifecycle-hooks for details.*/;
const reactDeprecationWarning = /.*has been renamed, and is not recommended for use.*/;
global.console[level] = (message, ...args) => {
if (reactDeprecationWarning.test(message) === false) {
throw new Error(`message=${message} args=${args}`);