Vitest · Function
afterAll
afterAll runs one callback after all tests in the current suite finish. It is useful for one-time cleanup, such as stopping a server or closing a database connection.
Last updated
Syntax
function afterAll(body: (context: ModuleContext) => unknown, timeout?: number): voidIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
beforeAllbeforeEachafterEacharoundAllhookTimeoutModuleContext