FafterEach
Bun

function

test.afterEach

function afterEach(
fn: () => void | Promise<unknown> | (done: (err?: unknown) => void) => void
): void;

Runs a function after each test.

This is useful for running clean up tasks, like closing a socket or deleting temporary files.

@param fn

the function to run