diff options
Diffstat (limited to 'cli/tests/integration/compat_tests.rs')
-rw-r--r-- | cli/tests/integration/compat_tests.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cli/tests/integration/compat_tests.rs b/cli/tests/integration/compat_tests.rs index ce89cc623..e8e6316bf 100644 --- a/cli/tests/integration/compat_tests.rs +++ b/cli/tests/integration/compat_tests.rs @@ -172,3 +172,22 @@ fn native_modules_as_global_vars() { ); assert!(out.contains("true")); } + +#[test] +fn ext_node_cjs_execution() { + let (out, _err) = util::run_and_collect_output_with_args( + true, + vec![ + "run", + "-A", + "--unstable", + "--quiet", + "commonjs/init.js", + "./example.js", + ], + None, + Some(vec![("DENO_NODE_COMPAT_URL".to_string(), std_file_url())]), + false, + ); + assert!(out.contains("{ hello: \"world\" }")); +} |