Skip to content

Commit 1304fed

Browse files
committedFeb 12, 2024··
fix(vitest): expose onTestFinished globally
1 parent 40f2a77 commit 1304fed

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
 

‎packages/vitest/globals.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ declare global {
1313
const afterAll: typeof import('vitest')['afterAll']
1414
const beforeEach: typeof import('vitest')['beforeEach']
1515
const afterEach: typeof import('vitest')['afterEach']
16+
const onTestFailed: typeof import('vitest')['onTestFailed']
17+
const onTestFinished: typeof import('vitest')['onTestFinished']
1618
}
1719
export {}

‎packages/vitest/src/constants.ts

+2
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,6 @@ export const globalApis = [
6868
'afterAll',
6969
'beforeEach',
7070
'afterEach',
71+
'onTestFinished',
72+
'onTestFailed',
7173
]

0 commit comments

Comments
 (0)
Please sign in to comment.