summaryrefslogtreecommitdiff
path: root/cli/tests/integration/npm_tests.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-05-22 16:55:04 -0400
committerGitHub <noreply@github.com>2023-05-22 16:55:04 -0400
commit7b4c483aa159794cdb9d57d3252c2980fba45469 (patch)
treeb1c3b0ab080e98ab20f470fbad5b1aba05045dfb /cli/tests/integration/npm_tests.rs
parent612226de8e2fe3068d981866242bacedfceb9734 (diff)
fix(npm): store npm binary command resolution in lockfile (#19219)
Part of #19038 Closes #19034 (eliminates the time spent re-resolving)
Diffstat (limited to 'cli/tests/integration/npm_tests.rs')
-rw-r--r--cli/tests/integration/npm_tests.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/cli/tests/integration/npm_tests.rs b/cli/tests/integration/npm_tests.rs
index 40214315a..73ac029df 100644
--- a/cli/tests/integration/npm_tests.rs
+++ b/cli/tests/integration/npm_tests.rs
@@ -723,6 +723,19 @@ itest!(deno_run_bin_cjs {
http_server: true,
});
+#[test]
+fn deno_run_bin_lockfile() {
+ let context = TestContextBuilder::for_npm().use_temp_cwd().build();
+ let temp_dir = context.temp_dir();
+ temp_dir.write("deno.json", "{}");
+ let output = context
+ .new_command()
+ .args("run -A --quiet npm:@denotest/bin/cli-esm this is a test")
+ .run();
+ output.assert_matches_file("npm/deno_run_esm.out");
+ assert!(temp_dir.path().join("deno.lock").exists());
+}
+
itest!(deno_run_non_existent {
args: "run npm:mkdirp@0.5.125",
output: "npm/deno_run_non_existent.out",