summaryrefslogtreecommitdiff
path: root/cli/tests/testdata
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-02-22 20:16:16 -0500
committerGitHub <noreply@github.com>2023-02-22 20:16:16 -0500
commitddc350780d6743be3794896e3987361df9f2cde7 (patch)
treef267d2756ddd7c1ffef8e4c080e0530e542aed3f /cli/tests/testdata
parenta31d8869ea6c0651109523963a23f16101ce7e64 (diff)
fix(npm): resolve node_modules dir relative to package.json instead of cwd (#17885)
Diffstat (limited to 'cli/tests/testdata')
-rw-r--r--cli/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.js2
-rw-r--r--cli/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.out7
2 files changed, 9 insertions, 0 deletions
diff --git a/cli/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.js b/cli/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.js
new file mode 100644
index 000000000..297653211
--- /dev/null
+++ b/cli/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.js
@@ -0,0 +1,2 @@
+console.log(Deno.cwd());
+console.log(Deno.statSync("../node_modules"));
diff --git a/cli/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.out b/cli/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.out
new file mode 100644
index 000000000..0ec791960
--- /dev/null
+++ b/cli/tests/testdata/run/with_package_json/no_deno_json/sub_dir/main.out
@@ -0,0 +1,7 @@
+Download http://[WILDCARD]
+[WILDCARD]sub_dir
+{
+ [WILDCARD]
+ isDirectory: true,
+ [WILDCARD]
+}