From c1b4ff61c9113166705526022452ed2fb00bc7d5 Mon Sep 17 00:00:00 2001 From: Akshat Agarwal Date: Thu, 10 Sep 2020 14:08:17 +0530 Subject: feat(unstable): Add Deno.systemMemoryInfo() (#7350) Co-authored-by: marcopacini Co-authored-by: Casper Beyer --- cli/tests/unit/os_test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cli/tests/unit') diff --git a/cli/tests/unit/os_test.ts b/cli/tests/unit/os_test.ts index 79f70afac..12caed156 100644 --- a/cli/tests/unit/os_test.ts +++ b/cli/tests/unit/os_test.ts @@ -177,3 +177,14 @@ unitTest({ perms: { env: false } }, function releasePerm(): void { Deno.osRelease(); }, Deno.errors.PermissionDenied); }); + +unitTest({ perms: { env: true } }, function systemMemoryInfo(): void { + const info = Deno.systemMemoryInfo(); + assert(info.total >= 0); + assert(info.free >= 0); + assert(info.available >= 0); + assert(info.buffers >= 0); + assert(info.cached >= 0); + assert(info.swapTotal >= 0); + assert(info.swapFree >= 0); +}); -- cgit v1.2.3