Test afterAll lifecycle and --ci completion#171
Closed
DmitrySharabin wants to merge 2 commits into
Closed
Conversation
This was referenced Jun 23, 2026
DmitrySharabin
force-pushed
the
fix/168-afterall-completion
branch
from
June 25, 2026 12:58
ae53957 to
e7128eb
Compare
DmitrySharabin
force-pushed
the
test/168-afterall-completion
branch
from
June 25, 2026 12:58
e355018 to
84252f8
Compare
DmitrySharabin
force-pushed
the
fix/168-afterall-completion
branch
from
June 26, 2026 14:59
e7128eb to
e02c79f
Compare
Member
Author
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.
Stacks on #170.
Two-layer regression coverage for #168:
Runs at every level, bottom-up, before result.finished resolves) — pins theTestResultfinish-listener contract. 3-level nested afterAll with mixed sync/async; asserts bottom-up push order.Completes before process.exit in --ci mode (issue #168)) — spawnsnode bin/htest.js fixture.js --ciin a subprocess; the fixture's asyncafterAllwrites[test] afterAll ranto stderr, captured and asserted on. Catches env-layer regressions the unit test can't.Verified by reverting each fix in isolation:
TestResult.js→ unit fails (Got ["level1", "root"], expected ["level2", "level1", "root"]).env/node.js→ e2e fails (Got false, expected true); unit still passes (independent coverage confirmed).Test plan