-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathvitest.config.ts
More file actions
40 lines (39 loc) · 1.2 KB
/
vitest.config.ts
File metadata and controls
40 lines (39 loc) · 1.2 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
import tsConfigPaths from 'vite-tsconfig-paths';
import { configDefaults, defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [tsConfigPaths()],
test: {
globals: true,
coverage: {
include: ['src/**/*.{js,ts}'],
},
projects: [
{
extends: true,
test: {
name: 'unit',
globals: true,
include: ['tests/scripts/**/*.{test,spec}.{js,ts,tsx}'],
exclude: [...configDefaults.exclude],
},
},
{
extends: true,
test: {
name: 'e2e',
environment: 'happy-dom',
include: ['tests/e2e/**/*.{test,spec}.{js,ts,tsx}'],
testTimeout: 60000,
setupFiles: [
'./tests/e2e/util/setup-env.ts'
],
environmentOptions: {
happyDOM: {
url: 'https://www.mousehuntgame.com/',
}
}
},
}
]
},
});