1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-19 20:26:20 -05:00
denoland-deno/tests/unit_node/inspector_test.ts
Je Xia 7b491a28df
fix(node): Add missing inspector/promises (#27491)
Add missing `inspector/promises` in node builtin module list, that
causes types checking error.
2024-12-31 11:06:21 +01:00

22 lines
745 B
TypeScript

// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import inspector, { Session } from "node:inspector";
import inspectorPromises, {
Session as SessionPromise,
} from "node:inspector/promises";
import { assertEquals } from "@std/assert/equals";
Deno.test("[node/inspector] - importing inspector works", () => {
assertEquals(typeof inspector.open, "function");
});
Deno.test("[node/inspector] - Session constructor should not throw", () => {
new Session();
});
Deno.test("[node/inspector/promises] - importing inspector works", () => {
assertEquals(typeof inspectorPromises.open, "function");
});
Deno.test("[node/inspector/promises] - Session constructor should not throw", () => {
new SessionPromise();
});