diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-02-21 23:03:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-21 23:03:11 +0000 |
commit | 197d2480bbfd57c6c5213ae12ce1e71b7d03f896 (patch) | |
tree | 778f00fcacaf6421f374d11cfabea534a45f2407 /tests/integration/compile_tests.rs | |
parent | 190776f30d8a3900c03e097ed4b9209db447301b (diff) |
fix(compile): respect compiler options for emit (#22521)
`deno compile` was ignoring configuration file and thus not applying
`compilerOptions` to influence the way files were emitted.
Diffstat (limited to 'tests/integration/compile_tests.rs')
-rw-r--r-- | tests/integration/compile_tests.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/integration/compile_tests.rs b/tests/integration/compile_tests.rs index fbf924fbb..b038819a7 100644 --- a/tests/integration/compile_tests.rs +++ b/tests/integration/compile_tests.rs @@ -1178,3 +1178,32 @@ fn dynamic_import_bad_data_uri() { "[WILDCARD]TypeError: Unable to decode data url.[WILDCARD]", ); } + +#[test] +fn standalone_config_file_respects_compiler_options() { + let context = TestContextBuilder::new().build(); + let dir = context.temp_dir(); + let exe = if cfg!(windows) { + dir.path().join("compiler_options.exe") + } else { + dir.path().join("compiler_options") + }; + context + .new_command() + .args_vec([ + "compile", + "--allow-read", + "--config", + "compile/compiler_options/deno.json", + "--output", + &exe.to_string_lossy(), + "./compile/compiler_options/main.ts", + ]) + .run() + .skip_output_check() + .assert_exit_code(0); + let output = context.new_command().name(&exe).run(); + + output.assert_exit_code(0); + output.assert_matches_text("[WILDCARD]C.test() called[WILDCARD]"); +} |