GeezerVison is showing github.com — DevTools test shell tweaks (#17054) · react/react@22b2642
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/react-devtools-shell/src/app
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/react-devtools-shell/src/app/console.js +6-1Lines changed: 6 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,12 @@ function ignoreStrings( |
11 | 11 | methodName: string, |
12 | 12 | stringsToIgnore: Array<string>, |
13 | 13 | ): void { |
14 | | - const originalMethod = console[methodName]; |
| 14 | + // HACKY In the test harness, DevTools overrides the parent window's console. |
| 15 | + // Our test app code uses the iframe's console though. |
| 16 | + // To simulate a more accurate end-ot-end ienvironment, |
| 17 | + // the shell's console patching should pass through to the parent override methods. |
| 18 | + const originalMethod = window.parent.console[methodName]; |
| 19 | + |
15 | 20 | console[methodName] = (...args) => { |
16 | 21 | const maybeString = args[0]; |
17 | 22 | if (typeof maybeString === 'string') { |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/react-devtools-shell/src/app/index.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -31,7 +31,7 @@ ignoreErrors([ |
31 | 31 | 'Warning: Unsafe lifecycle methods', |
32 | 32 | 'Warning: %s is deprecated in StrictMode.', // findDOMNode |
33 | 33 | ]); |
34 | | -ignoreWarnings(['Warning: componentWillReceiveProps is deprecated']); |
| 34 | +ignoreWarnings(['Warning: componentWillReceiveProps has been renamed']); |
35 | 35 |
|
36 | 36 | const roots = []; |
37 | 37 |
|
|