diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-02-22 20:16:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-22 20:16:16 -0500 |
commit | ddc350780d6743be3794896e3987361df9f2cde7 (patch) | |
tree | f267d2756ddd7c1ffef8e4c080e0530e542aed3f /cli/tests/integration/run_tests.rs | |
parent | a31d8869ea6c0651109523963a23f16101ce7e64 (diff) |
fix(npm): resolve node_modules dir relative to package.json instead of cwd (#17885)
Diffstat (limited to 'cli/tests/integration/run_tests.rs')
-rw-r--r-- | cli/tests/integration/run_tests.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index f30e7ce69..7dbf9c74c 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -2753,6 +2753,8 @@ itest!(package_json_auto_discovered_for_local_script_log { args: "run -L debug -A no_deno_json/main.ts", output: "run/with_package_json/no_deno_json/main.out", maybe_cwd: Some("run/with_package_json/"), + // prevent creating a node_modules dir in the code directory + copy_temp_dir: Some("run/with_package_json/"), envs: env_vars_for_npm_tests_no_sync_download(), http_server: true, }); @@ -2764,16 +2766,29 @@ itest!( args: "run -L debug with_stop/some/nested/dir/main.ts", output: "run/with_package_json/with_stop/main.out", maybe_cwd: Some("run/with_package_json/"), + copy_temp_dir: Some("run/with_package_json/"), envs: env_vars_for_npm_tests_no_sync_download(), http_server: true, exit_code: 1, } ); +itest!( + package_json_auto_discovered_node_modules_relative_package_json { + args: "run -A main.js", + output: "run/with_package_json/no_deno_json/sub_dir/main.out", + maybe_cwd: Some("run/with_package_json/no_deno_json/sub_dir"), + copy_temp_dir: Some("run/with_package_json/"), + envs: env_vars_for_npm_tests_no_sync_download(), + http_server: true, + } +); + itest!(package_json_auto_discovered_for_npm_binary { args: "run -L debug -A npm:@denotest/bin/cli-esm this is a test", output: "run/with_package_json/npm_binary/main.out", maybe_cwd: Some("run/with_package_json/npm_binary/"), + copy_temp_dir: Some("run/with_package_json/"), envs: env_vars_for_npm_tests_no_sync_download(), http_server: true, }); |