From 8a0e206ede0f5cc7c21312688e86a1157edb4bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 21 Oct 2021 00:23:57 +0200 Subject: compat: add DENO_NODE_COMPAT_URL env variable (#12508) --- cli/tests/integration/compat_tests.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'cli/tests/integration/compat_tests.rs') 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")); +} -- cgit v1.2.3