forked from vitest-dev/vitest
/
coverage.ts
82 lines (77 loc) · 1.36 KB
/
coverage.ts
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import type { Arrayable } from './general'
export type CoverageReporter =
| 'clover'
| 'cobertura'
| 'html-spa'
| 'html'
| 'json-summary'
| 'json'
| 'lcov'
| 'lcovonly'
| 'none'
| 'teamcity'
| 'text-lcov'
| 'text-summary'
| 'text'
export interface C8Options {
/**
* Enable coverage, pass `--coverage` to enable
*
* @default false
*/
enabled?: boolean
/**
* Directory to write coverage report to
*/
reportsDirectory?: string
/**
* Clean coverage before running tests
*
* @default true
*/
clean?: boolean
/**
* Clean coverage report on watch rerun
*
* @default false
*/
cleanOnRerun?: boolean
/**
* Check thresholds per file
*
* @default false
*/
perFile?: boolean
/**
* Allow files from outside of your cwd.
*
* @default false
*/
allowExternal?: any
/**
* Reporters
*
* @default 'text'
*/
reporter?: Arrayable<CoverageReporter>
/**
* Exclude coverage under /node_modules/
*
* @default true
*/
excludeNodeModules?: boolean
exclude?: string[]
include?: string[]
skipFull?: boolean
extension?: string | string[]
all?: boolean
src?: string[]
100?: boolean
lines?: number
functions?: number
branches?: number
statements?: number
}
export interface ResolvedC8Options extends Required<C8Options> {
tempDirectory: string
}