Vitest · Function
afterEach
afterEach runs cleanup after every test in the current file or suite. Vitest waits for asynchronous cleanup before continuing.
Last updated
Syntax
function afterEach(body: (context: TestContext) => unknown, timeout?: number): voidIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
beforeEachbeforeAllafterAllonTestFinishedhookTimeout