1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00

test(std/node): ensure process.env case doesn't rely on unset variables (#9144)

This commit is contained in:
Casper Beyer 2021-01-18 23:01:38 +08:00 committed by GitHub
parent 7a30d1a3d8
commit 6a50615e7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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");
},
});