Vitest · Function
onTestFailed
onTestFailed runs a callback only when the current test fails. Use it for failure debugging, especially with concurrent tests.
Last updated
Syntax
onTestFailed((context: TestContext) => unknown): voidIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
onTestFinishedbeforeEachafterEachtaskTestContext