diff --git a/packages/react-devtools-shell/src/app/console.js b/packages/react-devtools-shell/src/app/console.js index e41daa76d4269..9ae0e1ce84d6a 100644 --- a/packages/react-devtools-shell/src/app/console.js +++ b/packages/react-devtools-shell/src/app/console.js @@ -11,7 +11,12 @@ function ignoreStrings( methodName: string, stringsToIgnore: Array, ): void { - const originalMethod = console[methodName]; + // HACKY In the test harness, DevTools overrides the parent window's console. + // Our test app code uses the iframe's console though. + // To simulate a more accurate end-ot-end ienvironment, + // the shell's console patching should pass through to the parent override methods. + const originalMethod = window.parent.console[methodName]; + console[methodName] = (...args) => { const maybeString = args[0]; if (typeof maybeString === 'string') { diff --git a/packages/react-devtools-shell/src/app/index.js b/packages/react-devtools-shell/src/app/index.js index 45cffcf1af270..8483be6b050a9 100644 --- a/packages/react-devtools-shell/src/app/index.js +++ b/packages/react-devtools-shell/src/app/index.js @@ -31,7 +31,7 @@ ignoreErrors([ 'Warning: Unsafe lifecycle methods', 'Warning: %s is deprecated in StrictMode.', // findDOMNode ]); -ignoreWarnings(['Warning: componentWillReceiveProps is deprecated']); +ignoreWarnings(['Warning: componentWillReceiveProps has been renamed']); const roots = [];