summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit_node/perf_hooks_test.ts15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/unit_node/perf_hooks_test.ts b/tests/unit_node/perf_hooks_test.ts
index d5b900041..8247f9fd3 100644
--- a/tests/unit_node/perf_hooks_test.ts
+++ b/tests/unit_node/perf_hooks_test.ts
@@ -1,6 +1,10 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import * as perfHooks from "node:perf_hooks";
-import { performance, PerformanceObserver } from "node:perf_hooks";
+import {
+ monitorEventLoopDelay,
+ performance,
+ PerformanceObserver,
+} from "node:perf_hooks";
import { assertEquals, assertThrows } from "@std/assert";
Deno.test({
@@ -68,3 +72,12 @@ Deno.test("[perf_hooks]: eventLoopUtilization", () => {
assertEquals(typeof obj.active, "number");
assertEquals(typeof obj.utilization, "number");
});
+
+Deno.test("[perf_hooks]: monitorEventLoopDelay", () => {
+ const e = assertThrows(() => {
+ monitorEventLoopDelay({ resolution: 1 });
+ });
+
+ // deno-lint-ignore no-explicit-any
+ assertEquals((e as any).code, "ERR_NOT_IMPLEMENTED");
+});