docs: improve onTestFailed and onTestFinished jsdoc (#9175)

This commit is contained in:
Marco Pasqualetti 2025-12-08 02:15:43 +01:00 committed by GitHub
parent f17eb423d4
commit 220c0d58d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -712,13 +712,15 @@ export interface TestContext {
readonly signal: AbortSignal
/**
* Extract hooks on test failed
* Register a callback to run when this specific test fails.
* Useful when tests run concurrently.
* @see {@link https://vitest.dev/guide/test-context#ontestfailed}
*/
readonly onTestFailed: (fn: OnTestFailedHandler, timeout?: number) => void
/**
* Extract hooks on test failed
* Register a callback to run when this specific test finishes.
* Useful when tests run concurrently.
* @see {@link https://vitest.dev/guide/test-context#ontestfinished}
*/
readonly onTestFinished: (fn: OnTestFinishedHandler, timeout?: number) => void