-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
50 lines (49 loc) · 1.27 KB
/
vitest.config.ts
File metadata and controls
50 lines (49 loc) · 1.27 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
import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import path from 'path'
export default defineConfig({
plugins: [react()],
test: {
environment: 'jsdom',
envFile: '.env.test', // Load test environment variables
setupFiles: ['./tests/setup.ts'],
globals: true,
css: true,
include: ['tests/unit/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}', 'tests/security/**/*.{test,spec}.{js,ts,jsx,tsx}'],
exclude: ['tests/e2e/**/*', 'tests/integration/**/*', 'node_modules/**/*'],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
include: [
'app/**/*.{js,ts,jsx,tsx}',
'components/**/*.{js,ts,jsx,tsx}',
'convex/**/*.{js,ts}',
'lib/**/*.{js,ts}',
'hooks/**/*.{js,ts}'
],
exclude: [
'tests/**/*',
'**/*.d.ts',
'**/.next/**/*',
'**/node_modules/**/*',
'**/coverage/**/*',
'app/globals.css',
'**/*.config.{js,ts}',
'convex/_generated/**/*'
],
thresholds: {
global: {
branches: 60,
functions: 60,
lines: 60,
statements: 60
}
}
}
},
resolve: {
alias: {
'@': path.resolve(__dirname, './'),
},
},
})