Replace NodeJS dict aliases with maps and named field reads
This commit is contained in:
@@ -15,7 +15,11 @@ const PHASES: [phase: string, firstVariable: string][] = [
|
||||
|
||||
test.each(PHASES)("Node loads the %s phase", async (phase, firstVariable) => {
|
||||
const path = fileURLToPath(new URL(`../src/${phase}/index.ts`, import.meta.url));
|
||||
const result = await runCommand(process.execPath, [path], { PATH: process.env["PATH"] ?? "" });
|
||||
const result = await runCommand(
|
||||
process.execPath,
|
||||
[path],
|
||||
new Map([["PATH", process.env["PATH"] ?? ""]]),
|
||||
);
|
||||
expect(result.success).toBe(false);
|
||||
expect(result.stderr).toContain(`${firstVariable} is not set`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user