forked from vitest-dev/vitest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.ts
More file actions
45 lines (36 loc) · 1.1 KB
/
errors.ts
File metadata and controls
45 lines (36 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import type { CancelReason } from './types/runner'
import type { TaskBase } from './types/tasks'
export class PendingError extends Error {
public code = 'VITEST_PENDING'
public taskId: string
constructor(public message: string, task: TaskBase, public note: string | undefined) {
super(message)
this.taskId = task.id
}
}
export class TestRunAbortError extends Error {
public name = 'TestRunAbortError'
public reason: CancelReason
constructor(message: string, reason: CancelReason) {
super(message)
this.reason = reason
}
}
export class FixtureDependencyError extends Error {
public name = 'FixtureDependencyError'
}
export class FixtureAccessError extends Error {
public name = 'FixtureAccessError'
}
export class FixtureParseError extends Error {
public name = 'FixtureParseError'
}
export class AroundHookSetupError extends Error {
public name = 'AroundHookSetupError'
}
export class AroundHookTeardownError extends Error {
public name = 'AroundHookTeardownError'
}
export class AroundHookMultipleCallsError extends Error {
public name = 'AroundHookMultipleCallsError'
}