Skip to content

Commit 9ea5ffa

Browse files
authored
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.
1 parent 40357fe commit 9ea5ffa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/react-devtools-shared/src/__tests__/setupTests.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ function patchConsoleForTestingBeforeHookInstallation() {
150150
firstArg.startsWith(
151151
'The current testing environment is not configured to support act',
152152
) ||
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+
))
154157
) {
155158
// DevTools intentionally wraps updates with acts from both DOM and test-renderer,
156159
// since test updates are expected to impact both renderers.

0 commit comments

Comments
 (0)