diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-02-24 13:51:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-24 13:51:21 -0500 |
commit | 7ad64283a16cb0bfc9671ed482890d005eed9dcc (patch) | |
tree | aa8214250968627f909d1b5e8bd612f1c3a7c3e2 /cli/tests/integration/run_tests.rs | |
parent | 6472afd12bd5978869370948ef2357c810cb6071 (diff) |
fix(npm): package.json auto-discovery should respect `--no-config` and `--no-npm` (#17924)
Part of #17916
Diffstat (limited to 'cli/tests/integration/run_tests.rs')
-rw-r--r-- | cli/tests/integration/run_tests.rs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 4b7869ef6..f2d23a061 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -2749,9 +2749,10 @@ itest!(config_not_auto_discovered_for_remote_script { http_server: true, }); -itest!(package_json_auto_discovered_for_local_script_log { +itest!(package_json_auto_discovered_for_local_script_arg { args: "run -L debug -A no_deno_json/main.ts", output: "run/with_package_json/no_deno_json/main.out", + // notice this is not in no_deno_json cwd: Some("run/with_package_json/"), // prevent creating a node_modules dir in the code directory copy_temp_dir: Some("run/with_package_json/"), @@ -2762,7 +2763,7 @@ itest!(package_json_auto_discovered_for_local_script_log { // In this case we shouldn't discover `package.json` file, because it's in a // directory that is above the directory containing `deno.json` file. itest!( - package_json_auto_discovered_for_local_script_log_with_stop { + package_json_auto_discovered_for_local_script_arg_with_stop { args: "run -L debug with_stop/some/nested/dir/main.ts", output: "run/with_package_json/with_stop/main.out", cwd: Some("run/with_package_json/"), @@ -2773,6 +2774,18 @@ itest!( } ); +itest!(package_json_not_auto_discovered_no_config { + args: "run -L debug -A --no-config noconfig.ts", + output: "run/with_package_json/no_deno_json/noconfig.out", + cwd: Some("run/with_package_json/no_deno_json/"), +}); + +itest!(package_json_not_auto_discovered_no_npm { + args: "run -L debug -A --no-npm noconfig.ts", + output: "run/with_package_json/no_deno_json/noconfig.out", + cwd: Some("run/with_package_json/no_deno_json/"), +}); + itest!( package_json_auto_discovered_node_modules_relative_package_json { args: "run -A main.js", |