Skip to content

Add cleanup hook helpers#1

Open
rjnevins wants to merge 1 commit into
mainfrom
pal/ava-cleanup-hooks
Open

Add cleanup hook helpers#1
rjnevins wants to merge 1 commit into
mainfrom
pal/ava-cleanup-hooks

Conversation

@rjnevins

Copy link
Copy Markdown
Owner

/claim avajs#928

Summary

  • Add cleanup hook helpers that run before and after tests
  • Kept the patch narrow and aligned with the existing API/export shape.
  • Avoided new runtime dependencies unless already present or required.

Issue Reproduction

Fix Verification

  • node module-level cleanup chain smoke passed
  • npx xo lib/create-chain.js test/create-chain/test.js
  • npx tsd --files test-types/module/conditional-chains.ts
  • npx tsc --noEmit
  • git diff --check

Note: direct npx tap test/create-chain/test.js could not run locally because this machine has Node v25.9.0, while AVA supports ^22.20, ^24.12, or >=26.

Commands Run

  • node -e "import('./lib/create-chain.js').then(...)"
  • npx xo lib/create-chain.js test/create-chain/test.js
  • npx tsd --files test-types/module/conditional-chains.ts
  • npx tsc --noEmit
  • git diff --check

Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant