-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
46 lines (45 loc) · 1.25 KB
/
vitest.config.ts
File metadata and controls
46 lines (45 loc) · 1.25 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
import { defineConfig } from 'vitest/config';
import path from 'path';
export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
test: {
environment: 'node',
include: ['src/**/__tests__/**/*.test.ts'],
exclude: ['node_modules', '.next', 'dist', 'out'],
restoreMocks: true,
clearMocks: true,
testTimeout: 10000,
reporters: (process.env.GITHUB_ACTIONS || process.env.TF_BUILD)
? ['default', ...(process.env.GITHUB_ACTIONS ? ['github-actions'] : []), 'junit']
: ['default'],
outputFile: {
junit: './test-results/junit.xml',
},
coverage: {
provider: 'v8',
include: ['src/lib/**/*.ts', 'src/cli/**/*.ts'],
exclude: [
'src/**/*.test.ts',
'src/**/__tests__/**',
'src/lib/types/**',
'src/app/**',
'src/components/**',
'src/lib/report/templates/**',
'src/cli/bin/**',
],
reporter: ['text', 'json-summary', 'json', 'lcov', 'cobertura'],
reportOnFailure: true,
reportsDirectory: './coverage',
thresholds: {
statements: 80,
branches: 65,
functions: 80,
lines: 80,
},
},
},
});