-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvitest.config.mts
More file actions
46 lines (45 loc) · 1.03 KB
/
Copy pathvitest.config.mts
File metadata and controls
46 lines (45 loc) · 1.03 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
import path from 'node:path'
import { defineConfig } from 'vitest/config'
export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
},
test: {
coverage: {
provider: 'v8',
reporter: [
'text',
'json',
'html'
],
include: ['src/**/*.ts'],
exclude: ['src/database/migration/']
},
projects: [
{
extends: true,
test: {
name: 'unit',
globals: true,
environment: 'node',
mockReset: true,
clearMocks: true,
include: ['test/unit/**/*.test.ts', 'test/unit/**/*.spec.ts']
}
},
{
extends: true,
test: {
name: 'integration',
globals: true,
environment: 'node',
include: ['test/integration/**/*.test.ts', 'test/integration/**/*.spec.ts'],
setupFiles: ['test/integration/setup/load-env.ts'],
globalSetup: ['test/integration/setup/global-setup.ts']
}
}
]
}
})