-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathvite.config.mts
More file actions
37 lines (36 loc) · 1.01 KB
/
vite.config.mts
File metadata and controls
37 lines (36 loc) · 1.01 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
import { defineConfig } from 'vitest/config';
import baseConfig from '../../vite/vite.config';
export default defineConfig({
...baseConfig,
test: {
...baseConfig.test,
coverage: {
enabled: false,
},
isolate: false,
include: ['./suites/**/test.ts'],
testTimeout: 20_000,
// Ensure we can see debug output when DEBUG=true
...(process.env.DEBUG
? {
disableConsoleIntercept: true,
silent: false,
}
: {}),
// By default Vitest uses child processes to run tests but all our tests
// already run in their own processes. We use threads instead because the
// overhead is significantly less.
pool: 'threads',
// Run tests sequentially to avoid port conflicts with wrangler dev processes
poolOptions: {
threads: {
singleThread: true,
},
},
reporters: process.env.DEBUG
? ['default', { summary: false }]
: process.env.GITHUB_ACTIONS
? ['dot', 'github-actions']
: ['verbose'],
},
});