summaryrefslogtreecommitdiff
path: root/cli/tests/lsp
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2021-05-25 12:34:01 +1000
committerBert Belder <bertbelder@gmail.com>2021-05-31 16:37:33 +0200
commit6bbefdff395072503677e3b11dd8cba7d59efa18 (patch)
tree5d300dc28e970843a073fae181890cc9e03798fd /cli/tests/lsp
parent7b6bba5d3a47522aa9491a833c3cd4cbd8fc3d04 (diff)
feat(lsp): diagnostics for deno types and triple-slash refs (#10699)
Fixes #9823
Diffstat (limited to 'cli/tests/lsp')
-rw-r--r--cli/tests/lsp/diagnostics_deno_types.json101
-rw-r--r--cli/tests/lsp/did_open_params_deno_types.json8
2 files changed, 109 insertions, 0 deletions
diff --git a/cli/tests/lsp/diagnostics_deno_types.json b/cli/tests/lsp/diagnostics_deno_types.json
new file mode 100644
index 000000000..f33945a59
--- /dev/null
+++ b/cli/tests/lsp/diagnostics_deno_types.json
@@ -0,0 +1,101 @@
+{
+ "uri": "file:///a/file.ts",
+ "diagnostics": [
+ {
+ "range": {
+ "start": {
+ "line": 0,
+ "character": 21
+ },
+ "end": {
+ "line": 0,
+ "character": 51
+ }
+ },
+ "severity": 1,
+ "code": "no-cache",
+ "source": "deno",
+ "message": "Uncached or missing remote URL: \"https://example.com/a/b.d.ts\".",
+ "data": {
+ "specifier": "https://example.com/a/b.d.ts"
+ }
+ },
+ {
+ "range": {
+ "start": {
+ "line": 7,
+ "character": 19
+ },
+ "end": {
+ "line": 7,
+ "character": 47
+ }
+ },
+ "severity": 1,
+ "code": "no-cache",
+ "source": "deno",
+ "message": "Uncached or missing remote URL: \"https://example.com/a/e.js\".",
+ "data": {
+ "specifier": "https://example.com/a/e.js"
+ }
+ },
+ {
+ "range": {
+ "start": {
+ "line": 6,
+ "character": 16
+ },
+ "end": {
+ "line": 6,
+ "character": 44
+ }
+ },
+ "severity": 1,
+ "code": "no-cache",
+ "source": "deno",
+ "message": "Uncached or missing remote URL: \"https://example.com/a/e.d.ts\".",
+ "data": {
+ "specifier": "https://example.com/a/e.d.ts"
+ }
+ },
+ {
+ "range": {
+ "start": {
+ "line": 4,
+ "character": 19
+ },
+ "end": {
+ "line": 4,
+ "character": 47
+ }
+ },
+ "severity": 1,
+ "code": "no-cache",
+ "source": "deno",
+ "message": "Uncached or missing remote URL: \"https://example.com/a/d.js\".",
+ "data": {
+ "specifier": "https://example.com/a/d.js"
+ }
+ },
+ {
+ "range": {
+ "start": {
+ "line": 3,
+ "character": 15
+ },
+ "end": {
+ "line": 3,
+ "character": 43
+ }
+ },
+ "severity": 1,
+ "code": "no-cache",
+ "source": "deno",
+ "message": "Uncached or missing remote URL: \"https://example.com/a/d.d.ts\".",
+ "data": {
+ "specifier": "https://example.com/a/d.d.ts"
+ }
+ }
+ ],
+ "version": 1
+}
diff --git a/cli/tests/lsp/did_open_params_deno_types.json b/cli/tests/lsp/did_open_params_deno_types.json
new file mode 100644
index 000000000..6f085d045
--- /dev/null
+++ b/cli/tests/lsp/did_open_params_deno_types.json
@@ -0,0 +1,8 @@
+{
+ "textDocument": {
+ "uri": "file:///a/file.ts",
+ "languageId": "typescript",
+ "version": 1,
+ "text": "/// <reference types=\"https://example.com/a/b.d.ts\" />\n/// <reference path=\"https://example.com/a/c.ts\"\n\n// @deno-types=https://example.com/a/d.d.ts\nimport * as d from \"https://example.com/a/d.js\";\n\n// @deno-types=\"https://example.com/a/e.d.ts\"\nimport * as e from \"https://example.com/a/e.js\";\n\nconsole.log(d, e);\n"
+ }
+}