mirror of
https://github.com/hanzoai/vitest.git
synced 2026-09-24 17:04:25 +00:00
16 lines
280 B
TypeScript
16 lines
280 B
TypeScript
import { TestProject } from 'vitest/node';
|
|
|
|
const calls: string[] = [];
|
|
|
|
(globalThis as any).__CALLS = calls
|
|
|
|
export default (project: TestProject) => {
|
|
calls.push('start')
|
|
project.onTestsRerun(() => {
|
|
calls.push('rerun')
|
|
})
|
|
return () => {
|
|
calls.push('end')
|
|
}
|
|
}
|