-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.config.ts
39 lines (38 loc) · 1.07 KB
/
vitest.config.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
import { coverageConfigDefaults, defineConfig } from 'vitest/config';
export default defineConfig({
test: {
open: false,
include: ['tests/**/*.test.ts'],
setupFiles: ['tests/setup/database.ts'],
restoreMocks: true,
unstubEnvs: true,
unstubGlobals: true,
typecheck: {
tsconfig: './tsconfig.test.json',
include: ['tests/**/*.ts'],
},
browser: {
provider: 'playwright',
enabled: true,
headless: true,
screenshotFailures: false,
instances: [{ browser: 'chromium' }, { browser: 'firefox' }, { browser: 'webkit' }],
},
coverage: {
exclude: ['src/compat.ts', ...coverageConfigDefaults.exclude],
reporter: ['text', 'html', 'json-summary', 'json'],
reportOnFailure: true,
thresholds: {
// Set the base thresholds to 90%, per-file.
lines: 90,
functions: 90,
branches: 90,
statements: 90,
perFile: true,
// Might enable one day, was already 100%
// when thresholds were set.
// autoUpdate: true,
},
},
},
});