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

Add waitNextEventLoopTurnForUnhandledRejectionEvents flag #14681

Conversation

stekycz
Copy link
Contributor

@stekycz stekycz commented Nov 6, 2023

Followup on #14315

Summary

Adds waitNextEventLoopTurnForUnhandledRejectionEvents flag to await for the next even loop turn to correctly detect unhandled promise rejections in tests. See #14315 (comment) for more details

The feature of correct detection of unhandled promise rejections adds one event loop turn to every hook and test. It may have negative performance impact on test suites with many tests and hooks.

Copy link

netlify bot commented Nov 6, 2023

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 2cfa23f
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/6548f0c82c1f8e000846d0e9
😎 Deploy Preview https://deploy-preview-14681--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@SimenB
Copy link
Member

SimenB commented Nov 6, 2023

Sweet, thanks! Could you fix the ESLint and snapshot errors?

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

barring CI and some tiny docs tweaks, this LGTM! 😀

docs/CLI.md Show resolved Hide resolved
docs/CLI.md Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@stekycz stekycz requested a review from SimenB November 6, 2023 13:03
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of deleting/changing back the tests this feature caused in the first place, could we run Jets twice, with and without the config active?

e2e/__tests__/environmentAfterTeardownJasmine.test.ts Outdated Show resolved Hide resolved
e2e/__tests__/fakeTimersLegacy.test.ts Outdated Show resolved Hide resolved
@stekycz stekycz requested a review from SimenB November 6, 2023 13:58
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful stuff, thank you!

Sorry for all the back and forth, I appreciate you sticking with me on this! 👍

@SimenB SimenB merged commit d1a2ed7 into jestjs:main Nov 6, 2023
71 checks passed
@stekycz
Copy link
Contributor Author

stekycz commented Nov 6, 2023

No problem! I am happy to make it land eventually

@stekycz stekycz deleted the stekycz-flag-waitNextEventLoopTurnForUnhandledRejectionEvents branch November 6, 2023 14:49
@SimenB
Copy link
Member

SimenB commented Nov 16, 2023

Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants