-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathvitest.stoch.config.ts
More file actions
61 lines (47 loc) · 1.51 KB
/
Copy pathvitest.stoch.config.ts
File metadata and controls
61 lines (47 loc) · 1.51 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { defineConfig } from 'vitest/config';
/**
* Stochastic suite — equivalent to the former jest-stoch.config.cjs. Runs
* fast-check property tests in `*.stoch.ts` and emits a metrics.json
* summary in `./coverage/stoch/` for the readme build script.
*/
export default defineConfig({
test: {
name : 'stoch',
globals : true,
environment : 'node',
include : ['**/*.stoch.ts'],
exclude : ['**/node_modules/**', '**/dist/**', '.claude/**', 'notes/**'],
setupFiles : ['./vitest.setup.ts'],
reporters : [
'default',
['./src/buildjs/vitest_metrics_reporter.cjs', {
outputDir : './coverage/stoch',
outputFile : 'metrics.json'
}]
],
coverage: {
provider : 'v8',
enabled : true,
reportsDirectory : './coverage/stoch',
reporter : ['text', 'clover', 'lcov', 'html', 'json'],
include : ['src/ts/**/*.{js,ts}'],
exclude : [
'node_modules/**',
'src/ts/tests/**',
'src/ts/wc/tests/**',
'src/ts/fsl_parser.ts',
'src/ts/fsl_parser.js'
],
// No floor in the original jest-stoch config (thresholds were all 0).
thresholds: {
branches : 0,
functions : 0,
lines : 0,
statements : 0
}
},
// fast-check property tests can take a while.
testTimeout : 60_000,
hookTimeout : 60_000
}
});