Repository navigation
fix: surface global setup/teardown errors with a non-zero exit code - #5994
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5994 +/- ##
==========================================
- Coverage 80.89% 78.12% -2.78%
==========================================
Files 64 63 -1
Lines 4602 4590 -12
Branches 976 977 +1
==========================================
- Hits 3723 3586 -137
- Misses 879 1004 +125 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
JoshuaKGoldberg
approved these changes
Jun 7, 2026
JoshuaKGoldberg
left a comment
Member
There was a problem hiding this comment.
Looks great! Nicely done on the comprehensive tests.
Just leaving a few minor notes, nothing that would block merging if someone has a strong case against them. I'll leave this open for a bit in case Mark wants to review.
Co-authored-by: Josh Goldberg ✨ <github@joshuakgoldberg.com>
Co-authored-by: Josh Goldberg ✨ <github@joshuakgoldberg.com>
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
status: accepting prsOverview
When mochaGlobalSetup or mochaGlobalTeardown threw, the error escaped the runAsync(runner) promise chain and became an unhandled rejection. since there was no catch, "done" never ran, the failure never reached the runner, and mocha exited with code 0 while silently swallowing the error.
we now catch errors only at the runAsync boundary.
Normal runner errors are unchanged as before, only global fixture errors are handled here.