Skip to content

Commit

Permalink
chore[react-devtools]: add legacy mode error message to the ignore li…
Browse files Browse the repository at this point in the history
…st 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.
  • Loading branch information
hoxyq authored Oct 1, 2024
1 parent 40357fe commit 9ea5ffa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/react-devtools-shared/src/__tests__/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ function patchConsoleForTestingBeforeHookInstallation() {
firstArg.startsWith(
'The current testing environment is not configured to support act',
) ||
firstArg.startsWith('You seem to have overlapping act() calls'))
firstArg.startsWith('You seem to have overlapping act() calls') ||
firstArg.startsWith(
'ReactDOM.render is no longer supported in React 18.',
))
) {
// DevTools intentionally wraps updates with acts from both DOM and test-renderer,
// since test updates are expected to impact both renderers.
Expand Down

0 comments on commit 9ea5ffa

Please sign in to comment.