diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-06-12 20:23:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 15:23:38 -0400 |
commit | 1fff6f55c3ba98a10018c6d374795e612061e9b6 (patch) | |
tree | 12074b6d44736b11513d857e437f9e30a6bf65a4 /std/node/process_test.ts | |
parent | 26bf56afdaf16634ffbaa23684faf3a44cc10f62 (diff) |
refactor: Don't destructure the Deno namespace (#6268)
Diffstat (limited to 'std/node/process_test.ts')
-rw-r--r-- | std/node/process_test.ts | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/std/node/process_test.ts b/std/node/process_test.ts index 3afaa4cdf..058105a4a 100644 --- a/std/node/process_test.ts +++ b/std/node/process_test.ts @@ -1,11 +1,10 @@ -const { test } = Deno; import { assert, assertThrows, assertEquals } from "../testing/asserts.ts"; import { process } from "./process.ts"; // NOTE: Deno.execPath() (and thus process.argv) currently requires --allow-env // (Also Deno.env.toObject() (and process.env) requires --allow-env but it's more obvious) -test({ +Deno.test({ name: "process.cwd and process.chdir success", fn() { // this should be run like other tests from directory up @@ -17,7 +16,7 @@ test({ }, }); -test({ +Deno.test({ name: "process.chdir failure", fn() { assertThrows( @@ -33,7 +32,7 @@ test({ }, }); -test({ +Deno.test({ name: "process.version", fn() { assertEquals(typeof process, "object"); @@ -43,14 +42,14 @@ test({ }, }); -test({ +Deno.test({ name: "process.platform", fn() { assertEquals(typeof process.platform, "string"); }, }); -test({ +Deno.test({ name: "process.arch", fn() { assertEquals(typeof process.arch, "string"); @@ -59,7 +58,7 @@ test({ }, }); -test({ +Deno.test({ name: "process.pid", fn() { assertEquals(typeof process.pid, "number"); @@ -67,7 +66,7 @@ test({ }, }); -test({ +Deno.test({ name: "process.on", fn() { assertEquals(typeof process.on, "function"); @@ -81,7 +80,7 @@ test({ }, }); -test({ +Deno.test({ name: "process.argv", fn() { assert(Array.isArray(process.argv)); @@ -93,7 +92,7 @@ test({ }, }); -test({ +Deno.test({ name: "process.env", fn() { assertEquals(typeof process.env.PATH, "string"); |