-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvitest.config.base.ts
More file actions
47 lines (39 loc) · 1.12 KB
/
vitest.config.base.ts
File metadata and controls
47 lines (39 loc) · 1.12 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
import { fileURLToPath } from "node:url";
import { dirname, resolve } from "node:path";
import { config } from "dotenv";
// Load .env file from package directory or root directory
config({
path: resolve(dirname(fileURLToPath(import.meta.url)), ".env"),
});
export default {
test: {
// use threads mode
pool: "threads",
poolOptions: {
threads: {
// use single thread mode
singleThread: true,
// disable isolation to avoid worker termination problem
isolate: false,
},
},
// set timeout
testTimeout: 60000,
hookTimeout: 60000,
teardownTimeout: 30000,
// disable file parallelism, ensure stability
fileParallelism: false,
// set single thread mode for testing
maxConcurrency: 1,
// ensure normal exit even if tests fail
bail: 0,
// sequence tests to ensure proper cleanup between test files
sequence: {
concurrent: false,
shuffle: false,
},
// Use basic reporter to reduce duplicate output
// This prevents the verbose real-time progress updates that appear as duplicates
reporter: ["basic"],
},
};