test(FN-2360): harden test isolation around repo fusion state

This commit is contained in:
gsxdsm
2026-04-29 12:02:56 -07:00
parent 59cbc500c1
commit afd48c2cc4
10 changed files with 370 additions and 51 deletions

View File

@@ -1,5 +1,6 @@
import { defineConfig } from "vitest/config";
import { cpus } from "node:os";
import { resolve } from "node:path";
const defaultMaxWorkers = Math.max(1, cpus().length - 1);
const requestedMaxWorkers = Number.parseInt(process.env.VITEST_MAX_WORKERS ?? String(defaultMaxWorkers), 10);
@@ -8,6 +9,8 @@ process.env.VITEST_MAX_WORKERS = String(maxWorkers);
export default defineConfig({
test: {
setupFiles: [resolve(__dirname, "../core/src/__test-utils__/vitest-setup.ts")],
globalSetup: [resolve(__dirname, "../core/src/__test-utils__/vitest-teardown.ts")],
testTimeout: 30_000,
hookTimeout: 30_000,
maxWorkers,