summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarvin Hagemeister <marvin@deno.com>2024-08-14 14:33:42 +0200
committerGitHub <noreply@github.com>2024-08-14 12:33:42 +0000
commit533d31bc4e9c0cae2b9047850c39c68bf494595e (patch)
tree2c2b312712a088bbe3e287e3ac20a6aeaeb7cb5e /tests
parent3b4cbc189c6548c10a9e3ffc04453bdf5b4c0bf0 (diff)
fix: `node:inspector` not being registered (#25007)
For some reason we didn't register the `node:inspector` module, which lead to a panic when trying to import it. This PR registers it. Related: https://github.com/denoland/deno/issues/25004
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/lsp_tests.rs1
-rw-r--r--tests/integration/node_unit_tests.rs1
-rw-r--r--tests/unit_node/inspector_test.ts7
3 files changed, 9 insertions, 0 deletions
diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs
index 28c36cd20..e1ee25058 100644
--- a/tests/integration/lsp_tests.rs
+++ b/tests/integration/lsp_tests.rs
@@ -7548,6 +7548,7 @@ fn lsp_completions_node_specifier() {
"node:http",
"node:http2",
"node:https",
+ "node:inspector",
"node:module",
"node:net",
"node:os",
diff --git a/tests/integration/node_unit_tests.rs b/tests/integration/node_unit_tests.rs
index e87f1cd2f..74ed293e3 100644
--- a/tests/integration/node_unit_tests.rs
+++ b/tests/integration/node_unit_tests.rs
@@ -74,6 +74,7 @@ util::unit_test_factory!(
fetch_test,
http_test,
http2_test,
+ inspector_test,
_randomBytes_test = internal / _randomBytes_test,
_randomFill_test = internal / _randomFill_test,
_randomInt_test = internal / _randomInt_test,
diff --git a/tests/unit_node/inspector_test.ts b/tests/unit_node/inspector_test.ts
new file mode 100644
index 000000000..ec4d0ae3a
--- /dev/null
+++ b/tests/unit_node/inspector_test.ts
@@ -0,0 +1,7 @@
+// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+import inspector from "node:inspector";
+import { assertEquals } from "@std/assert/equals";
+
+Deno.test("[node/inspector] - importing inspector works", () => {
+ assertEquals(typeof inspector.open, "function");
+});