test(ci-runner): run fixture gates without pnpm's install check (F-12)
The freshness fixtures have a package.json but no node_modules. Started outside pnpm, the gate's pnpm run began an install there and failed with ERR_PNPM_IGNORED_BUILDS instead of testing the gate runner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a8520f6dfb
commit
d1aaaf69c9
@@ -6,6 +6,12 @@ import path from "node:path";
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
|
||||
import { loadCiGateContract } from "../../../scripts/contracts/ci-gates.ts";
|
||||
import { FIXTURE_PNPM_ENVIRONMENT } from "../../../scripts/lib/fixture-node-modules.ts";
|
||||
|
||||
// F-12. The temp roots have a package.json but no node_modules or lockfile.
|
||||
// Run directly (not under pnpm), pnpm's pre-script install check started an
|
||||
// install there and failed with ERR_PNPM_IGNORED_BUILDS; the gate runner has
|
||||
// to run the scripts as they are.
|
||||
|
||||
const temporaryRoots: string[] = [];
|
||||
|
||||
@@ -58,7 +64,7 @@ describe("CI-runner command-generated evidence freshness", () => {
|
||||
const result = spawnSync(
|
||||
process.execPath,
|
||||
[path.resolve("scripts/run-ci-gate.ts"), "FE-GATE-004"],
|
||||
{ cwd: root, encoding: "utf8", env: { ...process.env, CI: "false" } },
|
||||
{ cwd: root, encoding: "utf8", env: { ...process.env, ...FIXTURE_PNPM_ENVIRONMENT, CI: "false" } },
|
||||
);
|
||||
|
||||
expect(result.status).toBe(1);
|
||||
@@ -112,7 +118,7 @@ describe("CI-runner command-generated evidence freshness", () => {
|
||||
const result = spawnSync(
|
||||
process.execPath,
|
||||
[path.resolve("scripts/run-ci-gate.ts"), "FE-GATE-004"],
|
||||
{ cwd: root, encoding: "utf8", env: { ...process.env, CI: "false" } },
|
||||
{ cwd: root, encoding: "utf8", env: { ...process.env, ...FIXTURE_PNPM_ENVIRONMENT, CI: "false" } },
|
||||
);
|
||||
|
||||
expect(result.status).toBe(0);
|
||||
@@ -165,7 +171,7 @@ describe("CI-runner gate output budget", () => {
|
||||
{
|
||||
cwd: root,
|
||||
encoding: "utf8",
|
||||
env: { ...process.env, CI: "false" },
|
||||
env: { ...process.env, ...FIXTURE_PNPM_ENVIRONMENT, CI: "false" },
|
||||
timeout: 15_000,
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user