Skip to content

Commit

Permalink
test(node): ensure process.env case doesn't rely on unset variables (d…
Browse files Browse the repository at this point in the history
  • Loading branch information
caspervonb authored and denobot committed Feb 1, 2021
1 parent 262ae2f commit fd6743c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions node/process_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,14 @@ Deno.test({
Deno.test({
name: "process.env",
fn() {
assertEquals(typeof process.env.PATH, "string");
assertEquals(typeof env.PATH, "string");
Deno.env.set("HELLO", "WORLD");

assertEquals(typeof (process.env.HELLO), "string");
assertEquals(process.env.HELLO, "WORLD");

// TODO(caspervonb) test the globals in a different setting (they're broken)
// assertEquals(typeof env.HELLO, "string");
// assertEquals(env.HELLO, "WORLD");
},
});

Expand Down

0 comments on commit fd6743c

Please sign in to comment.