Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(node): Add missing inspector/promises #27491

Merged
merged 2 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cli/tsc/00_typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -136063,6 +136063,7 @@ var unprefixedNodeCoreModuleList = [
"https",
"http2",
"inspector",
"inspector/promises",
"module",
"net",
"os",
Expand Down
1 change: 1 addition & 0 deletions ext/node/polyfill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ generate_builtin_node_module_lists! {
"http2",
"https",
"inspector",
"inspector/promises",
"module",
"net",
"os",
Expand Down
1 change: 1 addition & 0 deletions tests/integration/lsp_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8712,6 +8712,7 @@ fn lsp_completions_node_specifier() {
"node:http2",
"node:https",
"node:inspector",
"node:inspector/promises",
"node:module",
"node:net",
"node:os",
Expand Down
11 changes: 11 additions & 0 deletions tests/unit_node/inspector_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// 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", () => {
Expand All @@ -9,3 +12,11 @@ Deno.test("[node/inspector] - importing inspector works", () => {
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();
});
Loading