-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvitest.config.ts
More file actions
28 lines (27 loc) · 753 Bytes
/
vitest.config.ts
File metadata and controls
28 lines (27 loc) · 753 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
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['./src/test-setup.ts'],
include: ['src/**/*.test.{ts,tsx}'],
coverage: {
provider: 'v8',
include: ['src/lib/**'],
exclude: [
'src/lib/sample-data.ts', // dynamic imports only, untestable
'src/lib/local-storage.ts', // IndexedDB not available in jsdom
'src/lib/zip.ts', // File.arrayBuffer() not available in jsdom
],
reporter: ['text', 'lcov'],
thresholds: {
lines: 80,
functions: 70,
statements: 80,
branches: 65,
},
},
},
});