feat(FN-3593): add test isolation CI enforcement, fix stuck-requeue race, a
This merge lands five FN-3593 commits establishing a test isolation contract with a new `scripts/check-test-isolation.mjs` guard that scans for accidental `beforeEach`/`afterEach`/`beforeAll`/`afterAll` in setup helpers, plus per-package `setup-test-isolation.ts` bootstraps that canonicalize the pat Fusion-Task-Id: FN-3593
This commit is contained in:
@@ -44,6 +44,7 @@ export function buildCliWithRealDashboardAssets() {
|
||||
return;
|
||||
}
|
||||
|
||||
runBuildCommand(`node ${join(workspaceRoot, "scripts", "ensure-test-artifacts.mjs")}`, workspaceRoot);
|
||||
runBuildCommand("pnpm --filter @fusion/dashboard build:client", workspaceRoot);
|
||||
runBuildCommand("pnpm build", cliRoot);
|
||||
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
/**
|
||||
* Global test isolation for CLI package.
|
||||
* @see packages/core/src/__tests__/setup-test-isolation.ts
|
||||
* Deprecated shim: canonical test isolation is in @fusion/core vitest-setup.
|
||||
*/
|
||||
import { mkdtempSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
|
||||
const tempHome = mkdtempSync(join(tmpdir(), "fn-test-home-"));
|
||||
process.env.HOME = tempHome;
|
||||
process.env.USERPROFILE = tempHome;
|
||||
if (process.platform === "win32") {
|
||||
const match = tempHome.match(/^([A-Za-z]:)(.*)$/);
|
||||
if (match) {
|
||||
process.env.HOMEDRIVE = match[1];
|
||||
process.env.HOMEPATH = match[2] || "\\";
|
||||
}
|
||||
}
|
||||
import "../../../core/src/__test-utils__/vitest-setup";
|
||||
|
||||
Reference in New Issue
Block a user