-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathvitest.config.ts
More file actions
52 lines (45 loc) · 1.38 KB
/
vitest.config.ts
File metadata and controls
52 lines (45 loc) · 1.38 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
import { defineConfig } from 'vitest/config'
import path from 'path'
export default defineConfig({
resolve: {
alias: {
// Mock vscode module for testing
'vscode': path.resolve(__dirname, 'test/__mocks__/vscode.ts')
}
},
test: {
// Match test files using common patterns
include: ['test/**/*.test.ts'],
exclude: ['**/node_modules/**', '**/dist/**', '**/build/**', '**/dist-test/**', 'test/integration/**'],
// Use jsdom environment for browser-like testing
environment: 'jsdom',
// Global test timeout
testTimeout: 10000,
// Setup files
setupFiles: ['./test/vitest-setup.ts'],
// Enable globals like describe, it, expect
globals: true,
// Coverage configuration
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: [
'node_modules/',
'dist/',
'dist-test/',
'lib*/',
'types/',
'test/',
'**/*.d.ts',
'esbuild.mjs',
'**/*.config.{js,ts,mjs}',
'**/coverage/**'
]
},
// Reporter configuration
reporters: ['verbose', 'junit'],
outputFile: {
junit: './test-results.xml'
}
}
})