summaryrefslogtreecommitdiff
path: root/std/node/process_test.ts
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2021-01-18 23:01:38 +0800
committerGitHub <noreply@github.com>2021-01-18 10:01:38 -0500
commit6a50615e7cc703b28a3e60c15980568c2fb0a020 (patch)
tree70418f851510c04ca486f4a4c2b7776ec785dad1 /std/node/process_test.ts
parent7a30d1a3d85b47434c1bdbd03052ade3dba3c77c (diff)
test(std/node): ensure process.env case doesn't rely on unset variables (#9144)
Diffstat (limited to 'std/node/process_test.ts')
-rw-r--r--std/node/process_test.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/std/node/process_test.ts b/std/node/process_test.ts
index 2a789a5d7..9b2c050a7 100644
--- a/std/node/process_test.ts
+++ b/std/node/process_test.ts
@@ -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");
},
});