-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
23 lines (22 loc) · 978 Bytes
/
Copy pathvitest.config.ts
File metadata and controls
23 lines (22 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
// Several native tests drive a process-global debugger/write-watch
// session (g_session in native/src/write_watch.cc) and spawn the
// shared test-harness.exe process. Vitest's default `threads` pool
// runs test FILES in parallel worker threads inside the same OS
// process, so two files touching that global session at once collide
// (one gets "a write-watch session is already active", the other's
// poll loop catches nothing). The suite is small enough that running
// files serially costs almost nothing, so trade the parallelism for
// correctness rather than making the native session per-handle.
fileParallelism: false,
server: {
deps: {
// Native .node addons must be loaded via Node's require, not
// transformed/parsed as JS/TS source by Vite's SSR pipeline.
external: [/\.node$/]
}
}
}
})