diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-01-31 22:15:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-01 03:15:22 +0000 |
commit | 4b7c6049ef9d40394eb823859c82cbf8d293430d (patch) | |
tree | 61e6de7c69c9d00faeef0ff7e6c223224a53de9e /cli/tests/integration/compile_tests.rs | |
parent | 830d096b66696ad9f4e67b3ed8460fb1ff7a9170 (diff) |
refactor: load bytes in deno_graph (#22212)
Upgrades deno_graph to 0.64 where deno_graph is now responsible for
turning bytes into a string. This is in preparation for Wasm modules.
Diffstat (limited to 'cli/tests/integration/compile_tests.rs')
-rw-r--r-- | cli/tests/integration/compile_tests.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/cli/tests/integration/compile_tests.rs b/cli/tests/integration/compile_tests.rs index d6c7febd5..cf3bf023d 100644 --- a/cli/tests/integration/compile_tests.rs +++ b/cli/tests/integration/compile_tests.rs @@ -1149,3 +1149,32 @@ fn granular_unstable_features() { output.assert_exit_code(0); output.assert_matches_text("Kv {}\n"); } + +#[test] +fn dynamic_import_bad_data_uri() { + let context = TestContextBuilder::new().build(); + let dir = context.temp_dir(); + let exe = if cfg!(windows) { + dir.path().join("app.exe") + } else { + dir.path().join("app") + }; + let file = dir.path().join("bad_data_uri.ts"); + file.write("await import('data:application/')"); + let output = context + .new_command() + .args_vec([ + "compile", + "--output", + &exe.to_string_lossy(), + &file.to_string_lossy(), + ]) + .run(); + output.assert_exit_code(0); + output.skip_output_check(); + let output = context.new_command().name(&exe).run(); + output.assert_exit_code(1); + output.assert_matches_text( + "[WILDCARD]TypeError: Unable to decode data url.[WILDCARD]", + ); +} |