test(FN-2360): harden test isolation around repo fusion state
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user