function
test.afterEach
fn: () => void | Promise<unknown> | (done: (err?: unknown) => void) => void,
options?: HookOptions
): void;
Runs a function after each test.
Use this for cleanup, like closing a socket or deleting temporary files.
@param fn
the function to run