summaryrefslogtreecommitdiff
path: root/tests/specs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs')
-rw-r--r--tests/specs/install/workspace_node_modules_not_exists/__test__.jsonc15
-rw-r--r--tests/specs/install/workspace_node_modules_not_exists/deno.json7
-rw-r--r--tests/specs/install/workspace_node_modules_not_exists/install.out22
-rw-r--r--tests/specs/install/workspace_node_modules_not_exists/package1/package.json5
-rw-r--r--tests/specs/install/workspace_node_modules_not_exists/package2/package.json5
5 files changed, 54 insertions, 0 deletions
diff --git a/tests/specs/install/workspace_node_modules_not_exists/__test__.jsonc b/tests/specs/install/workspace_node_modules_not_exists/__test__.jsonc
new file mode 100644
index 000000000..a39eb5e1f
--- /dev/null
+++ b/tests/specs/install/workspace_node_modules_not_exists/__test__.jsonc
@@ -0,0 +1,15 @@
+// Regression test for https://github.com/denoland/deno/issues/25493
+//
+// `deno install` where we need to create a `node_modules` for a workspace member
+// due to conflicting package versions, but when we go to set it up, the
+// symlink target path (`package2/node_modules/chalk`) has `node_modules` as its parent,
+// and it doesn't exist yet
+{
+ "tempDir": true,
+ "steps": [
+ {
+ "args": "install",
+ "output": "install.out"
+ }
+ ]
+}
diff --git a/tests/specs/install/workspace_node_modules_not_exists/deno.json b/tests/specs/install/workspace_node_modules_not_exists/deno.json
new file mode 100644
index 000000000..b3cca048f
--- /dev/null
+++ b/tests/specs/install/workspace_node_modules_not_exists/deno.json
@@ -0,0 +1,7 @@
+{
+ "nodeModulesDir": "auto",
+ "workspace": [
+ "./package1",
+ "./package2"
+ ]
+}
diff --git a/tests/specs/install/workspace_node_modules_not_exists/install.out b/tests/specs/install/workspace_node_modules_not_exists/install.out
new file mode 100644
index 000000000..22f7e4307
--- /dev/null
+++ b/tests/specs/install/workspace_node_modules_not_exists/install.out
@@ -0,0 +1,22 @@
+[UNORDERED_START]
+Download http://localhost:4260/chalk
+Download http://localhost:4260/ansi-styles
+Download http://localhost:4260/supports-color
+Download http://localhost:4260/color-convert
+Download http://localhost:4260/has-flag
+Download http://localhost:4260/color-name
+Download http://localhost:4260/chalk/chalk-4.1.2.tgz
+Download http://localhost:4260/chalk/chalk-5.0.1.tgz
+Download http://localhost:4260/supports-color/supports-color-7.2.0.tgz
+Download http://localhost:4260/ansi-styles/ansi-styles-4.3.0.tgz
+Download http://localhost:4260/has-flag/has-flag-4.0.0.tgz
+Download http://localhost:4260/color-convert/color-convert-2.0.1.tgz
+Download http://localhost:4260/color-name/color-name-1.1.4.tgz
+Initialize supports-color@7.2.0
+Initialize chalk@4.1.2
+Initialize ansi-styles@4.3.0
+Initialize color-name@1.1.4
+Initialize color-convert@2.0.1
+Initialize has-flag@4.0.0
+Initialize chalk@5.0.1
+[UNORDERED_END]
diff --git a/tests/specs/install/workspace_node_modules_not_exists/package1/package.json b/tests/specs/install/workspace_node_modules_not_exists/package1/package.json
new file mode 100644
index 000000000..0c5e77484
--- /dev/null
+++ b/tests/specs/install/workspace_node_modules_not_exists/package1/package.json
@@ -0,0 +1,5 @@
+{
+ "dependencies": {
+ "chalk": "4.1.2"
+ }
+}
diff --git a/tests/specs/install/workspace_node_modules_not_exists/package2/package.json b/tests/specs/install/workspace_node_modules_not_exists/package2/package.json
new file mode 100644
index 000000000..48d3d6917
--- /dev/null
+++ b/tests/specs/install/workspace_node_modules_not_exists/package2/package.json
@@ -0,0 +1,5 @@
+{
+ "dependencies": {
+ "chalk": "5.0.1"
+ }
+}