summaryrefslogtreecommitdiff
path: root/tests/unit_node/process_test.ts
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2024-09-05 21:21:29 +0900
committerGitHub <noreply@github.com>2024-09-05 21:21:29 +0900
commitdda63287456aae5cd4f7f428e23b52cb8c0005e5 (patch)
treeca1ee2443a3c19c8f910fd21907e5fa0ed8c98be /tests/unit_node/process_test.ts
parent5319b85f14d919c8a3f390a8db53c95922f1cf8d (diff)
fix(ext/node): stub `process.cpuUsage()` (#25462)
closes #23401
Diffstat (limited to 'tests/unit_node/process_test.ts')
-rw-r--r--tests/unit_node/process_test.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/unit_node/process_test.ts b/tests/unit_node/process_test.ts
index 962877935..b3db9753e 100644
--- a/tests/unit_node/process_test.ts
+++ b/tests/unit_node/process_test.ts
@@ -1131,3 +1131,9 @@ Deno.test(function importedExecArgvTest() {
Deno.test(function importedExecPathTest() {
assertEquals(importedExecPath, Deno.execPath());
});
+
+Deno.test("process.cpuUsage()", () => {
+ const cpuUsage = process.cpuUsage();
+ assert(typeof cpuUsage.user === "number");
+ assert(typeof cpuUsage.system === "number");
+});