-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvitest.config.ts
47 lines (46 loc) · 1.18 KB
/
vitest.config.ts
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
import { resolve } from 'path'
import swc from 'unplugin-swc'
import { configDefaults, defineConfig } from 'vitest/config'
export default defineConfig({
plugins: [swc.vite()],
optimizeDeps: {
exclude: [
'@nestjs/microservices',
'@nestjs/websockets',
'cache-manager',
'class-transformer',
'class-validator',
'fastify-swagger'
]
},
resolve: {
alias: {
'@': resolve(__dirname, 'src')
}
},
test: {
globals: true,
exclude: [...configDefaults.exclude, 'src/**/*.test.ts'],
root: resolve(__dirname),
environment: 'node',
// setupFiles: [],
coverage: {
provider: 'istanbul',
all: true,
cleanOnRerun: true,
// statements: 90,
// branches: 90,
reporter: ['text', 'html-spa', 'lcov'],
include: ['src/**/*.ts'],
exclude: [
'**/*.{d,spec,config}.ts',
'src/**/{types,__mocks__,__tests__}/**/*.*',
'src/data/{entities,factories,migrations,helpers,seeds}/*.*',
'src/domain/{base,contracts,entities,repositories}/**/*.*',
'src/infra/config/*.*',
'src/main/**/*.*',
'src/presentation/validation/**/*.*'
]
}
}
})