From 13279cb0ab5f0573fe846d55c7e031ac4731436d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 6 Jan 2024 15:01:09 +0100 Subject: fix(compile): preserve granular unstable features (#21827) Fix https://github.com/denoland/deno/issues/21814 --- cli/tests/integration/compile_tests.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'cli/tests/integration') diff --git a/cli/tests/integration/compile_tests.rs b/cli/tests/integration/compile_tests.rs index 788a7cda9..d6c7febd5 100644 --- a/cli/tests/integration/compile_tests.rs +++ b/cli/tests/integration/compile_tests.rs @@ -1123,3 +1123,29 @@ fn dynamic_imports_tmp_lit() { let output = context.new_command().name(&exe).run(); output.assert_matches_text("a\nb\n{ data: 5 }\n{ data: 1 }\n"); } + +#[test] +fn granular_unstable_features() { + 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 output = context + .new_command() + .args_vec([ + "compile", + "--output", + &exe.to_string_lossy(), + "--unstable-kv", + "./compile/unstable_features.ts", + ]) + .run(); + output.assert_exit_code(0); + output.skip_output_check(); + let output = context.new_command().name(&exe).run(); + output.assert_exit_code(0); + output.assert_matches_text("Kv {}\n"); +} -- cgit v1.2.3