-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.js
More file actions
42 lines (36 loc) · 837 Bytes
/
vitest.config.js
File metadata and controls
42 lines (36 loc) · 837 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
37
38
39
40
41
42
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
// Environment: Browser globals (project targets browser)
environment: 'jsdom',
// ES2022 support
globals: true,
// Test file patterns
include: [
'tests/unit/**/*.test.js',
'tests/integration/**/*.test.js',
],
// Exclude patterns
exclude: [
'node_modules',
'dist',
'build',
'tests/e2e/**/*', // E2E tests use Playwright
],
// Coverage configuration
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: [
'node_modules/',
'tests/',
'*.config.js',
],
},
// Reporters
reporters: ['default', 'json'],
outputFile: {
json: './test-results/vitest-results.json',
},
},
});