Vitest · Function
beforeAll
beforeAll runs setup once before all tests in the current suite. It supports async work, a timeout, and an optional cleanup function.
Last updated
Syntax
function beforeAll(body: (context: ModuleContext) => unknown, timeout?: number): voidIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
afterAllbeforeEachafterEacharoundAllhookTimeoutModuleContext