summaryrefslogtreecommitdiff
path: root/tests/specs/npm/nonexistent_file_node_modules_dir
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs/npm/nonexistent_file_node_modules_dir')
-rw-r--r--tests/specs/npm/nonexistent_file_node_modules_dir/__test__.jsonc10
-rw-r--r--tests/specs/npm/nonexistent_file_node_modules_dir/nonexistent_file/main.js2
-rw-r--r--tests/specs/npm/nonexistent_file_node_modules_dir/nonexistent_file/main.out4
3 files changed, 16 insertions, 0 deletions
diff --git a/tests/specs/npm/nonexistent_file_node_modules_dir/__test__.jsonc b/tests/specs/npm/nonexistent_file_node_modules_dir/__test__.jsonc
new file mode 100644
index 000000000..66595558f
--- /dev/null
+++ b/tests/specs/npm/nonexistent_file_node_modules_dir/__test__.jsonc
@@ -0,0 +1,10 @@
+{
+ "tempDir": true,
+ "args": "run -A --quiet --node-modules-dir nonexistent_file/main.js",
+ "output": "nonexistent_file/main.out",
+ "envs": {
+ "NO_COLOR": "1",
+ "NPM_CONFIG_REGISTRY": "http://localhost:4260/"
+ },
+ "exitCode": 1
+}
diff --git a/tests/specs/npm/nonexistent_file_node_modules_dir/nonexistent_file/main.js b/tests/specs/npm/nonexistent_file_node_modules_dir/nonexistent_file/main.js
new file mode 100644
index 000000000..c480b0548
--- /dev/null
+++ b/tests/specs/npm/nonexistent_file_node_modules_dir/nonexistent_file/main.js
@@ -0,0 +1,2 @@
+import hmacSHA512 from "npm:crypto-js/non-existent";
+console.log(hmacSHA512);
diff --git a/tests/specs/npm/nonexistent_file_node_modules_dir/nonexistent_file/main.out b/tests/specs/npm/nonexistent_file_node_modules_dir/nonexistent_file/main.out
new file mode 100644
index 000000000..baa79b1ce
--- /dev/null
+++ b/tests/specs/npm/nonexistent_file_node_modules_dir/nonexistent_file/main.out
@@ -0,0 +1,4 @@
+error: Unable to load [WILDCARD]non-existent imported from [WILDCARD]main.js
+
+Caused by:
+[WILDCARD]