diff options
Diffstat (limited to 'cli/tests/integration/run_tests.rs')
-rw-r--r-- | cli/tests/integration/run_tests.rs | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index eecf8537f..31b541e1c 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -3030,14 +3030,29 @@ itest!(package_json_auto_discovered_no_package_json_imports { copy_temp_dir: Some("run/with_package_json/no_deno_json"), }); -itest!(package_json_with_deno_json { - args: "run --quiet -A main.ts", - output: "package_json/deno_json/main.out", - cwd: Some("package_json/deno_json/"), - copy_temp_dir: Some("package_json/deno_json/"), - envs: env_vars_for_npm_tests_no_sync_download(), - http_server: true, -}); +#[test] +fn package_json_with_deno_json() { + let context = TestContextBuilder::for_npm() + .use_copy_temp_dir("package_json/deno_json/") + .cwd("package_json/deno_json/") + .build(); + let output = context.new_command().args("run --quiet -A main.ts").run(); + output.assert_matches_file("package_json/deno_json/main.out"); + + assert!(context + .temp_dir() + .path() + .join("package_json/deno_json/deno.lock") + .exists()); + + // run again and ensure the top level install doesn't happen twice + let output = context + .new_command() + .args("run --log-level=debug -A main.ts") + .run(); + let output = output.combined_output(); + assert_contains!(output, "Skipping top level install."); +} #[test] fn package_json_error_dep_value_test() { |