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/os_test.ts | |
parent | 26bf56afdaf16634ffbaa23684faf3a44cc10f62 (diff) |
refactor: Don't destructure the Deno namespace (#6268)
Diffstat (limited to 'std/node/os_test.ts')
-rw-r--r-- | std/node/os_test.ts | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/std/node/os_test.ts b/std/node/os_test.ts index f0b9ca79d..11de777a9 100644 --- a/std/node/os_test.ts +++ b/std/node/os_test.ts @@ -1,50 +1,49 @@ -const { test } = Deno; import { assert, assertThrows, assertEquals } from "../testing/asserts.ts"; import * as os from "./os.ts"; -test({ +Deno.test({ name: "build architecture is a string", fn() { assertEquals(typeof os.arch(), "string"); }, }); -test({ +Deno.test({ name: "home directory is a string", fn() { assertEquals(typeof os.homedir(), "string"); }, }); -test({ +Deno.test({ name: "tmp directory is a string", fn() { assertEquals(typeof os.tmpdir(), "string"); }, }); -test({ +Deno.test({ name: "hostname is a string", fn() { assertEquals(typeof os.hostname(), "string"); }, }); -test({ +Deno.test({ name: "platform is a string", fn() { assertEquals(typeof os.platform(), "string"); }, }); -test({ +Deno.test({ name: "release is a string", fn() { assertEquals(typeof os.release(), "string"); }, }); -test({ +Deno.test({ name: "getPriority(): PID must be a 32 bit integer", fn() { assertThrows( @@ -64,7 +63,7 @@ test({ }, }); -test({ +Deno.test({ name: "setPriority(): PID must be a 32 bit integer", fn() { assertThrows( @@ -84,7 +83,7 @@ test({ }, }); -test({ +Deno.test({ name: "setPriority(): priority must be an integer between -20 and 19", fn() { assertThrows( @@ -118,7 +117,7 @@ test({ }, }); -test({ +Deno.test({ name: "setPriority(): if only one argument specified, then this is the priority, NOT the pid", fn() { @@ -153,7 +152,7 @@ test({ }, }); -test({ +Deno.test({ name: "Signals are as expected", fn() { // Test a few random signals for equality @@ -163,21 +162,21 @@ test({ }, }); -test({ +Deno.test({ name: "EOL is as expected", fn() { assert(os.EOL == "\r\n" || os.EOL == "\n"); }, }); -test({ +Deno.test({ name: "Endianness is determined", fn() { assert(["LE", "BE"].includes(os.endianness())); }, }); -test({ +Deno.test({ name: "Load average is an array of 3 numbers", fn() { const result = os.loadavg(); @@ -188,7 +187,7 @@ test({ }, }); -test({ +Deno.test({ name: "Primitive coercion works as expected", fn() { assertEquals(`${os.arch}`, os.arch()); @@ -199,7 +198,7 @@ test({ }, }); -test({ +Deno.test({ name: "APIs not yet implemented", fn() { assertThrows( |