diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration/compat_tests.rs | 6 | ||||
-rw-r--r-- | cli/tests/testdata/compat/import_cjs_from_esm/main_dynamic.mjs | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/cli/tests/integration/compat_tests.rs b/cli/tests/integration/compat_tests.rs index c8fc1c0a0..5c6a93201 100644 --- a/cli/tests/integration/compat_tests.rs +++ b/cli/tests/integration/compat_tests.rs @@ -101,6 +101,12 @@ itest!(cjs_esm_interop { output: "compat/import_cjs_from_esm.out", }); +itest!(cjs_esm_interop_dynamic { + args: + "run --compat --unstable -A --quiet --no-check compat/import_cjs_from_esm/main_dynamic.mjs", + output: "compat/import_cjs_from_esm.out", +}); + #[test] fn globals_in_repl() { let (out, _err) = util::run_and_collect_output_with_args( diff --git a/cli/tests/testdata/compat/import_cjs_from_esm/main_dynamic.mjs b/cli/tests/testdata/compat/import_cjs_from_esm/main_dynamic.mjs new file mode 100644 index 000000000..e94af67a4 --- /dev/null +++ b/cli/tests/testdata/compat/import_cjs_from_esm/main_dynamic.mjs @@ -0,0 +1,2 @@ +const url = new URL("./imported.js", import.meta.url); +await import(url.href); |