summaryrefslogtreecommitdiff
path: root/std/node/os_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/node/os_test.ts')
-rw-r--r--std/node/os_test.ts33
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(