fix(ci): use singleFork on macOS CI to prevent worker crash

The vitest forks pool has a known issue where multiple workers can crash
during teardown on macOS CI runners. Using singleFork=true runs all tests
in a single fork process, avoiding the inter-worker race condition.
This commit is contained in:
Andrew Lauppe 2026-01-26 01:23:26 -05:00
parent 66ef42a2f9
commit a1fdd25ba4

View File

@ -26,6 +26,10 @@ export default defineConfig({
// Longer teardown on macOS CI for native module cleanup (node:sqlite, etc.)
teardownTimeout: macOSCI ? 30_000 : 10_000,
pool: "forks",
// Use single fork on macOS CI to avoid worker crash during teardown
poolOptions: macOSCI
? { forks: { singleFork: true } }
: undefined,
maxWorkers: isCI ? ciWorkers : localWorkers,
include: [
"src/**/*.test.ts",