-
-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathvitest.config.ts
More file actions
55 lines (54 loc) · 1.27 KB
/
vitest.config.ts
File metadata and controls
55 lines (54 loc) · 1.27 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
import { defineConfig, defineProject } from 'vitest/config'
export default defineConfig({
test: {
globals: true,
reporters: 'dot',
projects: [
// utils folders as *.test.ts in either test/unit or in src/**/*.test.ts
defineProject({
test: {
name: 'unit',
environment: 'node',
include: [
'./test/unit/**/*.test.ts',
'./src/**/*.test.ts',
],
exclude: [
'**/node_modules/**',
],
},
}),
// type-level tests via vitest typecheck
defineProject({
test: {
name: 'typecheck',
typecheck: {
enabled: true,
tsconfig: './test/types/tsconfig.json',
},
include: [
'./test/types/**/*.test-d.ts',
],
exclude: [
'**/node_modules/**',
'**/.claude/**',
],
},
}),
// e2e tests in test/e2e
defineProject({
test: {
name: 'e2e',
environment: 'node',
include: [
'./test/e2e/**/*.test.ts',
],
exclude: [
'**/node_modules/**',
],
globalSetup: './test/e2e/global-setup.ts',
},
}),
],
},
})