diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-11-13 19:47:01 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-13 19:47:01 +0530 |
commit | 7d9ba09f5a4464072476b8992e43f5e5c30bde3a (patch) | |
tree | f101692fb4ab1efbb291556e3eb764797249387c /tests/unit_node | |
parent | 9331e2cef044945a91d53ea4cdc829d304157e0d (diff) |
fix(ext/node): use ERR_NOT_IMPLEMENTED for notImplemented (#26853)
Diffstat (limited to 'tests/unit_node')
-rw-r--r-- | tests/unit_node/perf_hooks_test.ts | 15 |
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"); +}); |