summaryrefslogtreecommitdiff
path: root/tests/integration/lsp_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/lsp_tests.rs')
-rw-r--r--tests/integration/lsp_tests.rs28
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs
index 0c4c1544f..9300413b5 100644
--- a/tests/integration/lsp_tests.rs
+++ b/tests/integration/lsp_tests.rs
@@ -11318,12 +11318,38 @@ fn lsp_sloppy_imports_warn() {
"text": "export class B {}",
},
}));
+ client.did_open(json!({
+ "textDocument": {
+ "uri": temp_dir.join("c.js").uri_file(),
+ "languageId": "typescript",
+ "version": 1,
+ "text": "export class C {}",
+ },
+ }));
+ client.did_open(json!({
+ "textDocument": {
+ "uri": temp_dir.join("c.d.ts").uri_file(),
+ "languageId": "typescript",
+ "version": 1,
+ "text": "export class C {}",
+ },
+ }));
let diagnostics = client.did_open(json!({
"textDocument": {
"uri": temp_dir.join("file.ts").uri_file(),
"languageId": "typescript",
"version": 1,
- "text": "import * as a from './a';\nimport * as b from './b.js';\nconsole.log(a)\nconsole.log(b);\n",
+ "text": concat!(
+ "import * as a from './a';\n",
+ "import * as b from './b.js';\n",
+ // this one's types resolve to a .d.ts file and we don't
+ // bother warning about it because it's a bit complicated
+ // to explain to use @deno-types in a diagnostic
+ "import * as c from './c.js';\n",
+ "console.log(a)\n",
+ "console.log(b);\n",
+ "console.log(c);\n",
+ ),
},
}));
assert_eq!(