diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-11-29 09:32:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-29 09:32:23 -0500 |
commit | 9ac405d587ca1465debd4a65a09324b7a6b2c04f (patch) | |
tree | b3cc4adb3ddf06dc5d380c39f9e8a82c24b25655 /cli/tests/integration/compile_tests.rs | |
parent | 7e56a0466fc9964ca5dd3533bb65c00cd1bac4dc (diff) |
feat(compile): support "bring your own node_modules" in deno compile (#21377)
Not tested thoroughly. This is a good start.
Closes #21350
Diffstat (limited to 'cli/tests/integration/compile_tests.rs')
-rw-r--r-- | cli/tests/integration/compile_tests.rs | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/cli/tests/integration/compile_tests.rs b/cli/tests/integration/compile_tests.rs index 1d0a36145..df339c369 100644 --- a/cli/tests/integration/compile_tests.rs +++ b/cli/tests/integration/compile_tests.rs @@ -798,15 +798,36 @@ testing[WILDCARD]this r#"{ "dependencies": { "@denotest/esm-basic": "1" } }"#, ); - let output = context + context .new_command() .args("compile --output binary main.ts") - .run(); - output.assert_exit_code(0); - output.skip_output_check(); + .run() + .assert_exit_code(0) + .skip_output_check(); - let output = context.new_command().name(binary_path).run(); - output.assert_matches_text("2\n"); + context + .new_command() + .name(&binary_path) + .run() + .assert_matches_text("2\n"); + + // now try with byonm + temp_dir.remove_dir_all("node_modules"); + temp_dir.write("deno.json", r#"{"unstable":["byonm"]}"#); + context.run_npm("install"); + + context + .new_command() + .args("compile --output binary main.ts") + .run() + .assert_exit_code(0) + .assert_matches_text("Check file:///[WILDCARD]/main.ts\nCompile file:///[WILDCARD]/main.ts to binary[WILDCARD]\n"); + + context + .new_command() + .name(&binary_path) + .run() + .assert_matches_text("2\n"); } #[test] |