Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a test case in ReactUpdates-test #26399

Merged
merged 1 commit into from
Mar 16, 2023
Merged

Fix a test case in ReactUpdates-test #26399

merged 1 commit into from
Mar 16, 2023

Conversation

tyao1
Copy link
Contributor

@tyao1 tyao1 commented Mar 15, 2023

Just noticed the test isn't testing what it is meant to test properly.
The error Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot is thrown, the inner expect(error).toContain('Warning: Maximum update depth exceeded.'); failed and threw jest error, and the outer .toThrow('Maximum update depth exceeded.') happens to catch it makes the test pass.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Mar 15, 2023
@tyao1 tyao1 merged commit 87c803d into main Mar 16, 2023
@tyao1 tyao1 deleted the ty-fix-update-loop-test branch March 31, 2023 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants