Vitest · Function
test
test defines a test case with a name and a function containing expectations. Vitest can wait for asynchronous tests and supports options such as skipping, retries, concurrency, and custom timeouts.
Last updated
Syntax
function test(name: string | Function, body?: () => unknown, timeout?: number): void
function test(name: string | Function, options: TestOptions, body?: () => unknown): voidIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
ittest.skiptest.onlytest.concurrenttest.todotest.failstest.eachtest.for