mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
fix(tests): update deprecation warning for react 16.10
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user