From 305a9c04ba60630f9708b681cfebb522a6110cc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20Sj=C3=B6green?= Date: Mon, 26 Oct 2020 15:54:27 +0100 Subject: feat(unstable): add Deno.systemCpuInfo() (#7774) --- cli/tests/unit/os_test.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cli/tests') 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); +}); -- cgit v1.2.3