summaryrefslogtreecommitdiff
path: root/cli/tests/integration/compat_tests.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-10-18 19:36:28 +0200
committerGitHub <noreply@github.com>2021-10-18 19:36:28 +0200
commit617eeabe8369d7bfca7951d1cd55ac58ede1f9fb (patch)
tree61cfd7b8a5a0230528ed9547c12fcd7183125c6a /cli/tests/integration/compat_tests.rs
parent5a48d41bddf599b14dd9019ff49821c436ce4542 (diff)
feat(unstable): Node CJS and ESM resolvers for compat mode (#12424)
This commit adds CJS and ESM Node resolvers to the "--compat" mode. The functionality is spread across "cli/compat" module and Node compatibility layer in "deno_std/node"; this stems from the fact that ES module resolution can only be implemented in Rust as it needs to directly integrated with "deno_core"; however "deno_std/node" already provided CJS module resolution. Currently this resolution is only active when running a files using "deno run --compat --unstable <filename>", and is not available in other subcommands, which will be changed in follow up commits.
Diffstat (limited to 'cli/tests/integration/compat_tests.rs')
-rw-r--r--cli/tests/integration/compat_tests.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/cli/tests/integration/compat_tests.rs b/cli/tests/integration/compat_tests.rs
index 6b6ab81b5..17388a78e 100644
--- a/cli/tests/integration/compat_tests.rs
+++ b/cli/tests/integration/compat_tests.rs
@@ -9,21 +9,15 @@ itest!(globals {
});
itest!(fs_promises {
- args: "run --compat --unstable -A compat/fs_promises.js",
+ args: "run --compat --unstable -A compat/fs_promises.mjs",
output: "compat/fs_promises.out",
});
itest!(node_prefix_fs_promises {
- args: "run --compat --unstable -A compat/node_fs_promises.js",
+ args: "run --compat --unstable -A compat/node_fs_promises.mjs",
output: "compat/fs_promises.out",
});
-itest!(existing_import_map {
- args: "run --compat --unstable --import-map compat/existing_import_map.json compat/fs_promises.js",
- output: "compat/existing_import_map.out",
- exit_code: 1,
-});
-
#[test]
fn globals_in_repl() {
let (out, _err) = util::run_and_collect_output_with_args(