forked from pagefaultgames/pokerogue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.config.ts
41 lines (40 loc) · 877 Bytes
/
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
import { defineProject } from 'vitest/config';
import { defaultConfig } from './vite.config';
export default defineProject(({ mode }) => ({
...defaultConfig,
test: {
name: "main",
include: ["./src/test/**/*.{test,spec}.ts"],
exclude: ["./src/test/pre.test.ts"],
setupFiles: ['./src/test/vitest.setup.ts'],
server: {
deps: {
inline: ['vitest-canvas-mock'],
optimizer: {
web: {
include: ['vitest-canvas-mock'],
}
}
}
},
environment: 'jsdom' as const,
environmentOptions: {
jsdom: {
resources: 'usable',
},
},
threads: false,
trace: true,
restoreMocks: true,
watch: false,
coverage: {
provider: 'istanbul' as const,
reportsDirectory: 'coverage' as const,
reporters: ['text-summary', 'html'],
},
},
esbuild: {
pure: mode === 'production' ? [ 'console.log' ] : [],
keepNames: true,
},
}))