@samitouri / QOS-React / commits / 9ea5ffa9cb

chore[react-devtools]: add legacy mode error message to the ignore list for tests (#31060)

Without this, the console gets spammy whenever we run React DevTools tests against React 18.x, where this deprecation message was added.

Ruslan Lesiutin committed Oct 1, 2024 at 14:04 UTC 9ea5ffa9cba4869474a1d5d53e7d6c135be6adf7
1 file changed +4 -1
packages/react-devtools-shared/src/__tests__/setupTests.js
+4 -1
@@ -150,7 +150,10 @@ function patchConsoleForTestingBeforeHookInstallation() {
150 firstArg.startsWith(
151 'The current testing environment is not configured to support act',
152 ) ||
153 - firstArg.startsWith('You seem to have overlapping act() calls'))
153 + firstArg.startsWith('You seem to have overlapping act() calls') ||
154 + firstArg.startsWith(
155 + 'ReactDOM.render is no longer supported in React 18.',
156 + ))
157 ) {
158 // DevTools intentionally wraps updates with acts from both DOM and test-renderer,
159 // since test updates are expected to impact both renderers.