summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/lsp_tests.rs2
-rw-r--r--tests/specs/cache/with_bare_import/095_cache_with_bare_import.ts.out1
-rw-r--r--tests/specs/check/with_bare_import/095_cache_with_bare_import.ts.out1
-rw-r--r--tests/specs/run/bare_specifier_without_import/__test__.jsonc5
-rw-r--r--tests/specs/run/bare_specifier_without_import/main.out3
-rw-r--r--tests/specs/run/bare_specifier_without_import/main.ts3
-rw-r--r--tests/testdata/run/error_type_definitions.ts.out1
-rw-r--r--tests/testdata/run/node_prefix_missing/main.ts.out2
-rw-r--r--tests/testdata/run/with_package_json/with_stop/main.out1
9 files changed, 17 insertions, 2 deletions
diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs
index 4f0f8a985..78e526085 100644
--- a/tests/integration/lsp_tests.rs
+++ b/tests/integration/lsp_tests.rs
@@ -8905,7 +8905,7 @@ fn lsp_completions_node_builtin() {
"severity": 1,
"code": "import-node-prefix-missing",
"source": "deno",
- "message": "Relative import path \"fs\" not prefixed with / or ./ or ../\nIf you want to use a built-in Node module, add a \"node:\" prefix (ex. \"node:fs\").",
+ "message": "Relative import path \"fs\" not prefixed with / or ./ or ../\n \u{1b}[0m\u{1b}[36mhint:\u{1b}[0m If you want to use a built-in Node module, add a \"node:\" prefix (ex. \"node:fs\").",
"data": {
"specifier": "fs"
},
diff --git a/tests/specs/cache/with_bare_import/095_cache_with_bare_import.ts.out b/tests/specs/cache/with_bare_import/095_cache_with_bare_import.ts.out
index 2668a6e08..50daf8041 100644
--- a/tests/specs/cache/with_bare_import/095_cache_with_bare_import.ts.out
+++ b/tests/specs/cache/with_bare_import/095_cache_with_bare_import.ts.out
@@ -1,2 +1,3 @@
[WILDCARD]error: Relative import path "foo" not prefixed with / or ./ or ../
+ hint: If you want to use a JSR or npm package, try running `deno add foo`
at file:///[WILDCARD]/095_cache_with_bare_import.ts:[WILDCARD]
diff --git a/tests/specs/check/with_bare_import/095_cache_with_bare_import.ts.out b/tests/specs/check/with_bare_import/095_cache_with_bare_import.ts.out
index 2668a6e08..50daf8041 100644
--- a/tests/specs/check/with_bare_import/095_cache_with_bare_import.ts.out
+++ b/tests/specs/check/with_bare_import/095_cache_with_bare_import.ts.out
@@ -1,2 +1,3 @@
[WILDCARD]error: Relative import path "foo" not prefixed with / or ./ or ../
+ hint: If you want to use a JSR or npm package, try running `deno add foo`
at file:///[WILDCARD]/095_cache_with_bare_import.ts:[WILDCARD]
diff --git a/tests/specs/run/bare_specifier_without_import/__test__.jsonc b/tests/specs/run/bare_specifier_without_import/__test__.jsonc
new file mode 100644
index 000000000..7b5c5e1b6
--- /dev/null
+++ b/tests/specs/run/bare_specifier_without_import/__test__.jsonc
@@ -0,0 +1,5 @@
+{
+ "args": "run main.ts",
+ "output": "main.out",
+ "exitCode": 1
+}
diff --git a/tests/specs/run/bare_specifier_without_import/main.out b/tests/specs/run/bare_specifier_without_import/main.out
new file mode 100644
index 000000000..a873f2727
--- /dev/null
+++ b/tests/specs/run/bare_specifier_without_import/main.out
@@ -0,0 +1,3 @@
+error: Relative import path "@std/dotenv/load" not prefixed with / or ./ or ../
+ hint: If you want to use a JSR or npm package, try running `deno add @std/dotenv/load`
+ at [WILDCARD]bare_specifier_without_import/main.ts:1:8
diff --git a/tests/specs/run/bare_specifier_without_import/main.ts b/tests/specs/run/bare_specifier_without_import/main.ts
new file mode 100644
index 000000000..67e57b26b
--- /dev/null
+++ b/tests/specs/run/bare_specifier_without_import/main.ts
@@ -0,0 +1,3 @@
+import "@std/dotenv/load";
+
+console.log(Deno.env.get("GREETING")); // hello world
diff --git a/tests/testdata/run/error_type_definitions.ts.out b/tests/testdata/run/error_type_definitions.ts.out
index d60d4d483..7a71b4ebe 100644
--- a/tests/testdata/run/error_type_definitions.ts.out
+++ b/tests/testdata/run/error_type_definitions.ts.out
@@ -1,2 +1,3 @@
[WILDCARD]error: Failed resolving types. Relative import path "baz" not prefixed with / or ./ or ../
+ hint: If you want to use a JSR or npm package, try running `deno add baz`
at [WILDCARD]/type_definitions/bar.d.ts:[WILDCARD]
diff --git a/tests/testdata/run/node_prefix_missing/main.ts.out b/tests/testdata/run/node_prefix_missing/main.ts.out
index fd19ed55f..48b4e37e2 100644
--- a/tests/testdata/run/node_prefix_missing/main.ts.out
+++ b/tests/testdata/run/node_prefix_missing/main.ts.out
@@ -1,3 +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").
+ hint: 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/with_package_json/with_stop/main.out b/tests/testdata/run/with_package_json/with_stop/main.out
index f5eb79ca6..afab4910c 100644
--- a/tests/testdata/run/with_package_json/with_stop/main.out
+++ b/tests/testdata/run/with_package_json/with_stop/main.out
@@ -1,4 +1,5 @@
[WILDCARD]Config file found at '[WILDCARD]with_package_json[WILDCARD]with_stop[WILDCARD]some[WILDCARD]nested[WILDCARD]deno.json'
[WILDCARD]
error: Relative import path "chalk" not prefixed with / or ./ or ../
+ hint: If you want to use a JSR or npm package, try running `deno add chalk`
at file:///[WILDCARD]with_package_json/with_stop/some/nested/dir/main.ts:3:19