diff options
author | Elias Sjögreen <eliassjogreen1@gmail.com> | 2020-10-26 15:54:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 10:54:27 -0400 |
commit | 305a9c04ba60630f9708b681cfebb522a6110cc3 (patch) | |
tree | 36761c300215f1674c0ad2865f19538d88ec129e /cli/tests/unit/os_test.ts | |
parent | d52fb903cda4c30bb1673260c673ba27167ab7b1 (diff) |
feat(unstable): add Deno.systemCpuInfo() (#7774)
Diffstat (limited to 'cli/tests/unit/os_test.ts')
-rw-r--r-- | cli/tests/unit/os_test.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/tests/unit/os_test.ts b/cli/tests/unit/os_test.ts index a6eb3a760..4e12ddca3 100644 --- a/cli/tests/unit/os_test.ts +++ b/cli/tests/unit/os_test.ts @@ -188,3 +188,9 @@ unitTest({ perms: { env: true } }, function systemMemoryInfo(): void { assert(info.swapTotal >= 0); assert(info.swapFree >= 0); }); + +unitTest({ perms: { env: true } }, function systemCpuInfo(): void { + const { cores, speed } = Deno.systemCpuInfo(); + assert(cores === undefined || cores > 0); + assert(speed === undefined || speed > 0); +}); |