diff options
author | Akshat Agarwal <humancalico@disroot.org> | 2020-09-10 14:08:17 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 10:38:17 +0200 |
commit | c1b4ff61c9113166705526022452ed2fb00bc7d5 (patch) | |
tree | cb13bf71b73566312c5767789c0e19ade6713a08 /cli/tests/unit/os_test.ts | |
parent | dfd8794da463dd4d0649c41537b5475eaac10447 (diff) |
feat(unstable): Add Deno.systemMemoryInfo() (#7350)
Co-authored-by: marcopacini <pacinim88@gmail.com>
Co-authored-by: Casper Beyer <caspervonb@pm.me>
Diffstat (limited to 'cli/tests/unit/os_test.ts')
-rw-r--r-- | cli/tests/unit/os_test.ts | 11 |
1 files changed, 11 insertions, 0 deletions
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); +}); |