forked from MetaCubeX/metacubexd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
31 lines (30 loc) · 967 Bytes
/
vitest.config.ts
File metadata and controls
31 lines (30 loc) · 967 Bytes
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
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vitest/config'
export default defineConfig({
resolve: {
alias: {
'~': fileURLToPath(new URL('./', import.meta.url)),
},
},
test: {
include: ['e2e/**/*.spec.ts', '**/__tests__/**/*.spec.ts'],
// Increase timeout for e2e tests
testTimeout: 60000,
hookTimeout: 60000,
// Run tests sequentially since they share a server
pool: 'forks',
// Use maxWorkers: 1 to run tests sequentially (replaces poolOptions.forks.singleFork)
maxWorkers: 1,
// Setup file for unit tests
setupFiles: ['./test/setup.ts'],
// Use jsdom environment for DOM API support
environment: 'jsdom',
// Coverage configuration
coverage: {
provider: 'v8',
reporter: ['text', 'html', 'lcov'],
include: ['stores/**/*.ts', 'composables/**/*.ts', 'utils/**/*.ts'],
exclude: ['**/__tests__/**', '**/index.ts', '**/*.d.ts'],
},
},
})