summaryrefslogtreecommitdiff
path: root/cli/tests/integration/npm_tests.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-12-06 14:24:00 -0500
committerGitHub <noreply@github.com>2023-12-06 14:24:00 -0500
commit9bdc9e4ecb7227c80384206f6d7f869f183e4525 (patch)
tree8160f7388a7aca3710ef6546653a8f130ca28851 /cli/tests/integration/npm_tests.rs
parentf75eb12801134dadb63327a18ea718af3f06b4eb (diff)
fix(npm): do not create symlink for non-system optional dep in node_modules directory (#21478)
Closes https://github.com/denoland/deno/issues/21476
Diffstat (limited to 'cli/tests/integration/npm_tests.rs')
-rw-r--r--cli/tests/integration/npm_tests.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/cli/tests/integration/npm_tests.rs b/cli/tests/integration/npm_tests.rs
index fe3e6cd0f..9ac4efc4a 100644
--- a/cli/tests/integration/npm_tests.rs
+++ b/cli/tests/integration/npm_tests.rs
@@ -2009,6 +2009,15 @@ fn binary_package_with_optional_dependencies() {
assert!(!project_path
.join("node_modules/.deno/@denotest+binary-package-mac@1.0.0")
.exists());
+ assert!(project_path
+ .join("node_modules/.deno/@denotest+binary-package@1.0.0/node_modules/@denotest/binary-package-windows")
+ .exists());
+ assert!(!project_path
+ .join("node_modules/.deno/@denotest+binary-package@1.0.0/node_modules/@denotest/binary-package-linux")
+ .exists());
+ assert!(!project_path
+ .join("node_modules/.deno/@denotest+binary-package@1.0.0/node_modules/@denotest/binary-package-mac")
+ .exists());
}
#[cfg(target_os = "macos")]
@@ -2027,6 +2036,15 @@ fn binary_package_with_optional_dependencies() {
assert!(project_path
.join("node_modules/.deno/@denotest+binary-package-mac@1.0.0")
.exists());
+ assert!(!project_path
+ .join("node_modules/.deno/@denotest+binary-package@1.0.0/node_modules/@denotest/binary-package-windows")
+ .exists());
+ assert!(!project_path
+ .join("node_modules/.deno/@denotest+binary-package@1.0.0/node_modules/@denotest/binary-package-linux")
+ .exists());
+ assert!(project_path
+ .join("node_modules/.deno/@denotest+binary-package@1.0.0/node_modules/@denotest/binary-package-mac")
+ .exists());
}
#[cfg(target_os = "linux")]
@@ -2044,6 +2062,15 @@ fn binary_package_with_optional_dependencies() {
assert!(!project_path
.join("node_modules/.deno/@denotest+binary-package-mac@1.0.0")
.exists());
+ assert!(!project_path
+ .join("node_modules/.deno/@denotest+binary-package@1.0.0/node_modules/@denotest/binary-package-windows")
+ .exists());
+ assert!(project_path
+ .join("node_modules/.deno/@denotest+binary-package@1.0.0/node_modules/@denotest/binary-package-linux")
+ .exists());
+ assert!(!project_path
+ .join("node_modules/.deno/@denotest+binary-package@1.0.0/node_modules/@denotest/binary-package-mac")
+ .exists());
}
}
}