-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvite.config.ts
More file actions
36 lines (33 loc) · 932 Bytes
/
vite.config.ts
File metadata and controls
36 lines (33 loc) · 932 Bytes
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
// vite.config.ts
// This Vitest configuration is designed for a TypeScript project.
import { defineConfig } from 'vitest/config';
export default defineConfig({
cacheDir: '.cache/vite',
test: {
include: ['vitest/**/*.test.ts', 'vitest/**/*.spec.ts'],
exclude: ['dist', 'node_modules', 'src/mock'],
globals: true,
clearMocks: true,
restoreMocks: true,
environment: 'node',
maxWorkers: 100,
coverage: {
provider: 'v8', // default, but explicit
reporter: ['text', 'lcov'],
include: ['src/**/*.{ts,tsx,js,jsx}'],
exclude: [
// Exclude test files that may live under src
'src/**/*.test.{ts,tsx,js,jsx}',
'src/**/*.spec.{ts,tsx,js,jsx}',
// Exclude type declaration files
'src/**/*.d.ts',
],
thresholds: {
statements: 100,
branches: 100,
functions: 100,
lines: 100,
},
},
},
});