summaryrefslogtreecommitdiff
path: root/tests/testdata/run/node_prefix_missing
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testdata/run/node_prefix_missing')
-rw-r--r--tests/testdata/run/node_prefix_missing/config.json1
-rw-r--r--tests/testdata/run/node_prefix_missing/import_map.json1
-rw-r--r--tests/testdata/run/node_prefix_missing/main.ts3
-rw-r--r--tests/testdata/run/node_prefix_missing/main.ts.out3
-rw-r--r--tests/testdata/run/node_prefix_missing/main.ts.out_feature_enabled2
5 files changed, 10 insertions, 0 deletions
diff --git a/tests/testdata/run/node_prefix_missing/config.json b/tests/testdata/run/node_prefix_missing/config.json
new file mode 100644
index 000000000..67480c3d4
--- /dev/null
+++ b/tests/testdata/run/node_prefix_missing/config.json
@@ -0,0 +1 @@
+{ "unstable": ["bare-node-builtins"] }
diff --git a/tests/testdata/run/node_prefix_missing/import_map.json b/tests/testdata/run/node_prefix_missing/import_map.json
new file mode 100644
index 000000000..3add7d009
--- /dev/null
+++ b/tests/testdata/run/node_prefix_missing/import_map.json
@@ -0,0 +1 @@
+{ "imports": {} }
diff --git a/tests/testdata/run/node_prefix_missing/main.ts b/tests/testdata/run/node_prefix_missing/main.ts
new file mode 100644
index 000000000..c5c1885a2
--- /dev/null
+++ b/tests/testdata/run/node_prefix_missing/main.ts
@@ -0,0 +1,3 @@
+import fs from "fs";
+
+console.log(fs.writeFile);
diff --git a/tests/testdata/run/node_prefix_missing/main.ts.out b/tests/testdata/run/node_prefix_missing/main.ts.out
new file mode 100644
index 000000000..fd19ed55f
--- /dev/null
+++ b/tests/testdata/run/node_prefix_missing/main.ts.out
@@ -0,0 +1,3 @@
+error: Relative import path "fs" not prefixed with / or ./ or ../
+If you want to use a built-in Node module, add a "node:" prefix (ex. "node:fs").
+ at file:///[WILDCARD]/main.ts:1:16
diff --git a/tests/testdata/run/node_prefix_missing/main.ts.out_feature_enabled b/tests/testdata/run/node_prefix_missing/main.ts.out_feature_enabled
new file mode 100644
index 000000000..513b411ce
--- /dev/null
+++ b/tests/testdata/run/node_prefix_missing/main.ts.out_feature_enabled
@@ -0,0 +1,2 @@
+[WILDCARD]Warning: Resolving "fs" as "node:fs" at file:///[WILDCARD]/tests/testdata/run/node_prefix_missing/main.ts:1:16. If you want to use a built-in Node module, add a "node:" prefix.
+[Function: writeFile]