-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
reporter.ts
23 lines (17 loc) · 848 Bytes
/
reporter.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import type { Vitest } from '../node'
import type { Awaitable, UserConsoleLog } from './general'
import type { File, TaskResultPack } from './tasks'
export interface Reporter {
onInit?(ctx: Vitest): void
onPathsCollected?: (paths?: string[]) => Awaitable<void>
onCollected?: (files?: File[]) => Awaitable<void>
onFinished?: (files?: File[], errors?: unknown[]) => Awaitable<void>
onTaskUpdate?: (packs: TaskResultPack[]) => Awaitable<void>
onTestRemoved?: (trigger?: string) => Awaitable<void>
onWatcherStart?: (files?: File[], errors?: unknown[]) => Awaitable<void>
onWatcherRerun?: (files: string[], trigger?: string) => Awaitable<void>
onServerRestart?: (reason?: string) => Awaitable<void>
onUserConsoleLog?: (log: UserConsoleLog) => Awaitable<void>
onProcessTimeout?: () => Awaitable<void>
}
export type { Vitest }