Add cleanup hook helpers - #3457
Open
jamilahmadzai wants to merge 6 commits into
Open
Conversation
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.
Fixes #928
Summary
test.cleanup()andtest.cleanupEach()as paired setup and guaranteed-cleanup hooks..skip()variants while preserving conditional-chain access.Validation
Run locally:
npx test-ava test/create-chain/test.js- 25 passednpx tap test-tap/hooks.js- 32 passednpx tap test-tap/reporters/tap.js- 5 passednpx tsc --noEmit- passednpx xo- passed (10 existing TODO/FIXME warnings)A complete
npm testrun passed lint, TypeScript, and all 217 core tests (2 skipped). The broader TAP run passed 1,625/1,628 assertions; the only three failures were existing Node 24 default-reporter snapshot mismatches, reproduced unchanged onupstream/main.Bounty
IssueHunt funded amount: $82. Payout GitHub user: @jamilahmadzai.
IssueHunt Summary
Referenced issues
This pull request has been submitted to: