summaryrefslogtreecommitdiff
path: root/cli/tests/integration/compat_tests.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-10-21 00:23:57 +0200
committerGitHub <noreply@github.com>2021-10-21 00:23:57 +0200
commit8a0e206ede0f5cc7c21312688e86a1157edb4bcf (patch)
tree5eed1c9550a82c745c6ad2e6f3f3e2f527afcf68 /cli/tests/integration/compat_tests.rs
parent46bc1175e51d64fce623b8e4c4b846ed02d19bea (diff)
compat: add DENO_NODE_COMPAT_URL env variable (#12508)
Diffstat (limited to 'cli/tests/integration/compat_tests.rs')
-rw-r--r--cli/tests/integration/compat_tests.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/cli/tests/integration/compat_tests.rs b/cli/tests/integration/compat_tests.rs
index 17388a78e..2886056ec 100644
--- a/cli/tests/integration/compat_tests.rs
+++ b/cli/tests/integration/compat_tests.rs
@@ -29,3 +29,20 @@ fn globals_in_repl() {
);
assert!(out.contains("true"));
}
+
+#[test]
+fn node_compat_url() {
+ let (out, err) = util::run_and_collect_output_with_args(
+ false,
+ vec!["repl", "--compat", "--unstable", "--quiet"],
+ None,
+ Some(vec![(
+ "DENO_NODE_COMPAT_URL".to_string(),
+ "file:///non_existent/".to_string(),
+ )]),
+ false,
+ );
+ assert!(out.is_empty());
+ assert!(!err.is_empty());
+ assert!(err.contains("file:///non_existent/node/global.ts"));
+}