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

Rejct toWarnDev if given callback throws #26003

Merged
merged 1 commit into from
Jan 15, 2023

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Jan 15, 2023

Summary

Should unblock #25970
If the callback for toWarnDev was async and threw, we didn't ultimately reject the await Promise from the matcher. This resulted in tests failing even though the failure was expected due to a test gate.

How did you test this change?

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jan 15, 2023
@eps1lon eps1lon marked this pull request as ready for review January 15, 2023 15:20
@eps1lon eps1lon merged commit 4f8ffec into facebook:main Jan 15, 2023
github-actions bot pushed a commit that referenced this pull request Jan 15, 2023
## Summary

Should unblock #25970
If the callback for `toWarnDev` was `async` and threw, we didn't
ultimately reject the await Promise from the matcher. This resulted in
tests failing even though the failure was expected due to a test gate.

## How did you test this change?

- [x] tested in #25970 with `yarn
test --r=stable --env=development
packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js --watch`
- [x] `yarn test`
- [x] CI

DiffTrain build for [4f8ffec](4f8ffec)
[View git log for this commit](https://github.com/facebook/react/commits/4f8ffec453c41fcb6e98cb4e003f7319bb1c81b9)
@eps1lon eps1lon deleted the test/warn-dev-throw- branch January 15, 2023 18:48
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.

3 participants