mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
fix(ext/node): use ERR_NOT_IMPLEMENTED for notImplemented (#26853)
This commit is contained in:
parent
9331e2cef0
commit
7d9ba09f5a
3 changed files with 26 additions and 3 deletions
|
@ -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");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue