fix(test): delayed process.exit(0) in 8 test files silently truncates full bun-test runs#2252
Open
whd4 wants to merge 2 commits into
Open
fix(test): delayed process.exit(0) in 8 test files silently truncates full bun-test runs#2252whd4 wants to merge 2 commits into
whd4 wants to merge 2 commits into
Conversation
… guard + idle-timer stop, closeTab zero-tab invariant, align config tests to DEFAULTS contract Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…est files + exitFn seam in ServerConfig Each afterAll scheduled setTimeout(() => process.exit(0), 500) which fired ~500ms into the NEXT test file during full-suite runs, killing bun with a green exit code and no tally — silently truncating the suite and hiding every failure in later files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
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.
The bug
Eight test files end
afterAllwithsetTimeout(() => process.exit(0), 500):snapshot, commands, batch, handoff, compare-board, content-security, security-live-playwright, and design/feedback-roundtrip.
In a full
bun testrun, that timer fires ~500ms into the next file and kills the runner with exit code 0 and no failure tally. A full-suite run therefore only ever executes the files before the first exit, and still reports success. Sharded per-file CI (like this repo's) structurally never sees it — but anyone runningbun testacross the whole suite gets silently truncated green results.The fix (2 commits)
exitFninjection seam so tests can assert exit behavior without killing the runner.Honest caveat
After this fix, a full run no longer truncates — which reveals pre-existing failures that were always being skipped (in our environment 200+, mostly browser
gototimeouts under heavy load, plus some real breaks such assession.clearLoadedHtml is not a functionin design tests). This PR does not claim to make the suite green; it makes the runner honest so failures are visible and fixable.🤖 Generated with Claude Code