test(registration): share the isolated child process environment (#14525)

This commit is contained in:
Vincent Koc authored and GitHub committed 2026-11-25 08:29:25 -05:00
1 parent cb477ff0e7
commit 63d1ecac00
5 files changed
+28 -59

No files matched your search

@@ -4,6 +4,7 @@ import { expect, it } from "vitest";
import { z } from "zod";
import { createTestTempDirectory } from "../../tests/fixtures/temporaryDirectory.js";
import { registrationChildEnvironment } from "../../tests/support/cli/registrationEnvironment.js";
import { createTestProcessRegistry } from "../../tests/support/process/processFixture.js";
const CONFIGURATION_PROGRAM = `
@@ -102,22 +103,7 @@ it("repairs equal-launcher Copilot JSONC syntax while strict JSON and standard J
process.execPath,
["--import", "tsx", entrypoint],
{
env: {
PATH: process.env.PATH,
SystemRoot: process.env.SystemRoot,
WINDIR: process.env.WINDIR,
TMPDIR: process.env.TMPDIR,
TMP: process.env.TMP,
TEMP: process.env.TEMP,
HOME: home,
USERPROFILE: home,
XDG_CONFIG_HOME: join(home, "config"),
XDG_DATA_HOME: join(home, "data"),
XDG_CACHE_HOME: join(home, "cache"),
XDG_STATE_HOME: join(home, "state"),
APPDATA: join(home, "appdata"),
LOCALAPPDATA: join(home, "localappdata"),
},
env: registrationChildEnvironment(home),
},
);
expect(child.exitCode, child.stderr).toBe(0);