Skip to main content

method Deno.DenoTest.afterAll

#DenoTest.afterAll(fn: () => void | Promise<void>): void

Register a function to be called after all tests in the current scope have finished running.

These functions are run in the LIFO order (last in, first out).

If an exception is raised during execution of this hook, the remaining afterAll hooks will not be run.

Deno.test.afterAll(() => {
  // Cleanup code that runs once after all tests
  console.log("Cleaning up test suite");
});

Parameters #

#fn: () => void | Promise<void>

Return Type #

void

Did you find what you needed?

Privacy policy