-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathvitest.config.mjs
More file actions
29 lines (28 loc) · 963 Bytes
/
vitest.config.mjs
File metadata and controls
29 lines (28 loc) · 963 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
import {defineConfig} from 'vitest/config';
export default defineConfig({
test: {
// Tests are in test/ directory (not tests/)
include: ['test/**/*.test.ts', 'test/**/*.spec.ts'],
exclude: ['node_modules', 'lib', 'dist', 'e2e', 'playground'],
environment: 'node',
globals: true,
setupFiles: ['./test/setup/snapshot-serializer.ts'],
snapshotFormat: {
escapeString: true,
printBasicPrototype: false,
},
// Configure module resolution to match Jest setup
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
// Coverage configuration
coverage: {
all: true,
provider: 'v8',
include: ['src/**'],
exclude: ['src/**/*.test.ts', 'src/**/*.spec.ts', 'test/**/*'],
excludeAfterRemap: true,
reporter: ['text', 'json', 'html', 'lcov'],
},
},
});