-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvitest.config.ts
More file actions
48 lines (47 loc) · 1.26 KB
/
vitest.config.ts
File metadata and controls
48 lines (47 loc) · 1.26 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
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vitest/config'
import { defineVitestProject } from '@nuxt/test-utils/config'
export default defineConfig({
test: {
projects: [
{
resolve: {
alias: { '~': fileURLToPath(new URL('./app', import.meta.url)) },
},
test: {
name: 'unit',
include: ['test/unit/**/*.{test,spec}.ts'],
environment: 'node',
},
},
await defineVitestProject({
test: {
name: 'nuxt',
include: ['test/nuxt/**/*.{test,spec}.ts'],
hookTimeout: 30000,
environment: 'nuxt',
environmentOptions: {
nuxt: {
rootDir: fileURLToPath(new URL('.', import.meta.url)),
domEnvironment: 'happy-dom',
},
},
},
}),
{
test: {
name: 'integration',
include: ['test/integration/**/*.{test,spec}.ts'],
testTimeout: 60000,
environment: 'node',
},
},
],
coverage: {
provider: 'v8',
include: ['server/utils/**/*.ts', 'app/composables/**/*.ts', 'app/stores/**/*.ts', 'shared/**/*.ts'],
exclude: ['**/*.d.ts'],
reporter: ['text', 'html'],
},
},
})