deno/tests/specs/test/hooks
Bartek Iwańczuk 9fac6ccb8b
Some checks are pending
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
feat(test): Add setup and teardown APIs to Deno.test API (#30504)
This commit adds `Deno.test.beforeAll`, `Deno.test.beforeEach`,
`Deno.test.afterAll` and `Deno.test.afterEach` APIs. 

These APIs can be used to perform setup and teardown for test cases. 

The API is similar to the Vitest API: https://vitest.dev/api/#setup-and-teardown, 
with the main difference being that that `before*` hooks don't return a cleanup
function.
2025-09-02 16:27:04 +02:00
..
__test__.jsonc feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
afterall_error.out feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
afterall_error.ts feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
aftereach_error.out feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
aftereach_error.ts feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
async_error.out feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
async_error.ts feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
basic.out feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
basic.ts feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
before_after_each_error.out feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
before_after_each_error.ts feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
beforeall_error.out feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
beforeall_error.ts feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
beforeeach_error.out feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
beforeeach_error.ts feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
mixed_errors.out feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00
mixed_errors.ts feat(test): Add setup and teardown APIs to Deno.test API (#30504) 2025-09-02 16:27:04 +02:00