Skip to content

Commit 220c0d5

Browse files
authored
docs: improve onTestFailed and onTestFinished jsdoc (#9175)
1 parent f17eb42 commit 220c0d5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/runner/src/types/tasks.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,13 +712,15 @@ export interface TestContext {
712712
readonly signal: AbortSignal
713713

714714
/**
715-
* Extract hooks on test failed
715+
* Register a callback to run when this specific test fails.
716+
* Useful when tests run concurrently.
716717
* @see {@link https://vitest.dev/guide/test-context#ontestfailed}
717718
*/
718719
readonly onTestFailed: (fn: OnTestFailedHandler, timeout?: number) => void
719720

720721
/**
721-
* Extract hooks on test failed
722+
* Register a callback to run when this specific test finishes.
723+
* Useful when tests run concurrently.
722724
* @see {@link https://vitest.dev/guide/test-context#ontestfinished}
723725
*/
724726
readonly onTestFinished: (fn: OnTestFinishedHandler, timeout?: number) => void

0 commit comments

Comments
 (0)