perf(client): run the client suite in the vmThreads pool

Vitest 5's duration diagnostics flagged that the jsdom environment was created
once per client file — 111 times, 36% of tracked time. vmThreads creates it
once per worker while keeping per-file isolation, so the same 153 files /
2429 tests and the same 100%-per-file coverage scope (131 instrumented files)
now finish in ~16.7s instead of ~24.0s: paired interleaved medians of five
gate runs, and ~46% faster at the CI runner's four workers.

Client-only: the host project fails under vmThreads (10 files), and the
`isolate: false` shortcut the same hint offers fails two client files.
Peak process-tree memory rises ~0.9 GB (3.0 -> 3.9 GB).
This commit is contained in:
bowenliang123 committed 2026-10-16 23:18:16 +08:00
1 parent e620e4fbf6
commit 2ce42f6e7a
1 file changed
+2
+2
View File
@@ -19,6 +19,8 @@ export default defineConfig({
name: 'client',
include: ['tests/client/**/*.spec.ts'],
environment: 'jsdom',
// One jsdom environment per worker instead of one per file (111 files): ~30% off the coverage gate. Client-only — the host project fails under this pool.
pool: 'vmThreads',
setupFiles: ['tests/client/setup.ts'],
server: {
deps: {