summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-08-04 14:30:48 +0200
committerGitHub <noreply@github.com>2023-08-04 14:30:48 +0200
commit8d8a89ceea9edd5c1f3519769d4c1861e232719d (patch)
tree64ec35958eef6ad83df279e075bdb490a16743cf /cli/tests
parent5311f69bbbd169726330ddae20ce119624b8e8ca (diff)
fix(node): repl._builtinLibs (#20046)
Ref https://github.com/denoland/deno/issues/19733
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/node_unit_tests.rs1
-rw-r--r--cli/tests/unit_node/repl_test.ts17
2 files changed, 18 insertions, 0 deletions
diff --git a/cli/tests/integration/node_unit_tests.rs b/cli/tests/integration/node_unit_tests.rs
index b4fdbcf7b..b9a3d4b1e 100644
--- a/cli/tests/integration/node_unit_tests.rs
+++ b/cli/tests/integration/node_unit_tests.rs
@@ -73,6 +73,7 @@ util::unit_test_factory!(
process_test,
querystring_test,
readline_test,
+ repl_test,
stream_test,
string_decoder_test,
timers_test,
diff --git a/cli/tests/unit_node/repl_test.ts b/cli/tests/unit_node/repl_test.ts
new file mode 100644
index 000000000..e703d69f8
--- /dev/null
+++ b/cli/tests/unit_node/repl_test.ts
@@ -0,0 +1,17 @@
+// deno-lint-ignore-file no-undef
+// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
+
+import repl from "node:repl";
+import { assert } from "../../../test_util/std/testing/asserts.ts";
+
+Deno.test({
+ name: "repl module exports",
+ fn() {
+ assert(typeof repl.REPLServer !== "undefined");
+ assert(typeof repl.start !== "undefined");
+ // @ts-ignore not present in declaration files, but libraries depend on it
+ assert(typeof repl.builtinModules !== "undefined");
+ // @ts-ignore not present in declaration files, but libraries depend on it
+ assert(typeof repl._builtinLibs !== "undefined");
+ },
+});