Repository navigation
fix(test): handle rejections between tests - #40158
deepshekhardas wants to merge 1 commit into
Conversation
An unhandled rejection that escapes every test/hook (e.g. a file's top-level async IIFE) was silently swallowed and the file passed. Report it like an uncaught exception between tests: print the error and count it so the file fails. Fixes oven-sh#34859
|
Warning Review limit reachedYour included review limit has been reached. You’re in a promotional period — use the checkbox below to run this review for free:
On-demand reviews are free for the next 29 days. After that, they cost $0.25 per reviewed file. How can I continue?Run this review now using the option above, or comment You can also wait for the limit to reset (next review available in 50 minutes), then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thank you for the PR. This branch is the same commit (6978ec8) as #38898. #38898 was closed on August 15 in favor of #34862, and #34862 is still open for #34859. To keep one PR per issue in the review queue, I am closing this one as a duplicate of #34862. As noted on #38898: the branch this change edits is the fallback for when no test file is active, so a rejection from a test file never reaches it. The shape the issue describes needs the runner to keep the event loop running after the module is evaluated, which is what #34862 does. |
Fixes #34859
Handle rejections between tests correctly to avoid unhandled promise rejections leaking across test boundaries.