-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.js
More file actions
47 lines (38 loc) · 986 Bytes
/
vitest.config.js
File metadata and controls
47 lines (38 loc) · 986 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
43
44
45
46
47
import { defineConfig } from 'vitest/config';
import path from 'path';
export default defineConfig({
test: {
// Enable global test APIs (describe, it, expect, etc.)
globals: true,
// Use jsdom for DOM simulation
environment: 'jsdom',
// Test file patterns
include: ['tests/js/**/*.test.js', 'tests/js/**/*.spec.js'],
// Coverage configuration
coverage: {
provider: 'v8',
reporter: ['text', 'html', 'lcov', 'json'],
reportsDirectory: './coverage',
// Files to include/exclude
include: ['src/static/js/**/*.js'],
exclude: [
'node_modules/**',
'tests/**',
'venv/**',
'**/*.config.js',
'**/coverage/**',
],
},
// Setup files
setupFiles: ['./tests/js/setup.js'],
// Test timeout
testTimeout: 10000,
// Hooks timeout
hookTimeout: 10000,
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src/static/js'),
},
},
});