Replace NodeJS dict aliases with maps and named field reads
Co-authored-by: Danny Kim <temeddix@gmail.com> Co-committed-by: Danny Kim <temeddix@gmail.com>
This commit was merged in pull request #24.
This commit is contained in:
@@ -14,8 +14,14 @@ 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 path = fileURLToPath(
|
||||
new URL(`../src/${phase}/index.ts`, import.meta.url),
|
||||
);
|
||||
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