diff --git a/tests/unit/fixture-node-modules.test.ts b/tests/unit/fixture-node-modules.test.ts index 720f76f7..dbd7edee 100644 --- a/tests/unit/fixture-node-modules.test.ts +++ b/tests/unit/fixture-node-modules.test.ts @@ -209,7 +209,10 @@ describe("pnpm inside a linked fixture (F-4)", () => { }; // Installed on a developer machine (no CI); the fixtures then run pnpm // with CI=true, which pnpm reads as different settings and reinstalls. - const { CI: _ci, ...developer } = environment; + // pnpm also takes GITEA_ACTIONS, GITHUB_ACTIONS and other vendor + // variables for CI, so a runner job without CI still looked like CI and + // nothing was reinstalled. CI=false makes pnpm skip those checks. + const developer: NodeJS.ProcessEnv = { ...environment, CI: "false" }; const install = spawnSync("corepack", ["pnpm", "install", "--offline"], { cwd: source, encoding: "utf8",