-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.js
More file actions
67 lines (58 loc) · 1.33 KB
/
vitest.config.js
File metadata and controls
67 lines (58 loc) · 1.33 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
// Test environment
environment: 'jsdom',
// Global test setup
globals: true,
// Test file patterns
include: [
'test/**/*.{test,spec}.{js,ts}',
'src/**/*.{test,spec}.{js,ts}',
'viewer/**/*.{test,spec}.{js,ts}'
],
// Exclude patterns
exclude: [
'node_modules/**',
'dist/**',
'web-ext-artifacts/**'
],
// Coverage configuration
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: [
'node_modules/**',
'test/**',
'libs/**',
'*.config.js',
'dist/**',
'web-ext-artifacts/**'
],
thresholds: {
global: {
branches: 70,
functions: 70,
lines: 70,
statements: 70
}
}
},
// Test timeout
testTimeout: 10000,
// Setup files
setupFiles: ['./test/setup.js'],
// Mock Chrome APIs
deps: {
inline: ['d3']
}
},
// Resolve configuration for imports
resolve: {
alias: {
'@': new URL('./src', import.meta.url).pathname,
'@viewer': new URL('./viewer', import.meta.url).pathname,
'@test': new URL('./test', import.meta.url).pathname
}
}
});