summaryrefslogtreecommitdiff
path: root/std/node/os_test.ts
diff options
context:
space:
mode:
authorGyubong <jopemachine@naver.com>2020-11-19 21:56:32 +0900
committerGitHub <noreply@github.com>2020-11-19 07:56:32 -0500
commitd5772a937b36379ca932e4083404460874419859 (patch)
treec6df553856f05a08281edd781347d81e9ae0258f /std/node/os_test.ts
parent723fbb8f68eeaf6e5c14d9f8ac2c32f986ed60d9 (diff)
feat(std/node): add os.totalmem, os.freemem (#8317)
Diffstat (limited to 'std/node/os_test.ts')
-rw-r--r--std/node/os_test.ts28
1 files changed, 14 insertions, 14 deletions
diff --git a/std/node/os_test.ts b/std/node/os_test.ts
index e4231aa3c..8879f8345 100644
--- a/std/node/os_test.ts
+++ b/std/node/os_test.ts
@@ -201,6 +201,20 @@ Deno.test({
});
Deno.test({
+ name: "Total memory amount should be greater than 0",
+ fn() {
+ assert(os.totalmem() > 0);
+ },
+});
+
+Deno.test({
+ name: "Free memory amount should be greater than 0",
+ fn() {
+ assert(os.freemem() > 0);
+ },
+});
+
+Deno.test({
name: "APIs not yet implemented",
fn() {
assertThrows(
@@ -212,13 +226,6 @@ Deno.test({
);
assertThrows(
() => {
- os.freemem();
- },
- Error,
- "Not implemented",
- );
- assertThrows(
- () => {
os.getPriority();
},
Error,
@@ -240,13 +247,6 @@ Deno.test({
);
assertThrows(
() => {
- os.totalmem();
- },
- Error,
- "Not implemented",
- );
- assertThrows(
- () => {
os.type();
},
Error,