mirror of
https://github.com/denoland/deno.git
synced 2025-09-30 22:21:15 +00:00
test(std/node): ensure process.env case doesn't rely on unset variables (#9144)
This commit is contained in:
parent
7a30d1a3d8
commit
6a50615e7c
1 changed files with 8 additions and 2 deletions
|
@ -131,8 +131,14 @@ Deno.test({
|
||||||
Deno.test({
|
Deno.test({
|
||||||
name: "process.env",
|
name: "process.env",
|
||||||
fn() {
|
fn() {
|
||||||
assertEquals(typeof process.env.PATH, "string");
|
Deno.env.set("HELLO", "WORLD");
|
||||||
assertEquals(typeof env.PATH, "string");
|
|
||||||
|
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");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue