summaryrefslogtreecommitdiff
path: root/tests/integration/lsp_tests.rs
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2024-07-22 15:06:08 +0100
committerGitHub <noreply@github.com>2024-07-22 15:06:08 +0100
commit5a696551b78e0122b7d3e35eafc1b97aa6c119ed (patch)
treee7e2b9fe6e8665f87a580ef26079346b970c8f21 /tests/integration/lsp_tests.rs
parent95847f4e9443ad8c8e0504c9fdd1d7f8eb4e588f (diff)
fix(lsp): scope attribution for asset documents (#24663)
Diffstat (limited to 'tests/integration/lsp_tests.rs')
-rw-r--r--tests/integration/lsp_tests.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/integration/lsp_tests.rs b/tests/integration/lsp_tests.rs
index ae859a650..8034bb683 100644
--- a/tests/integration/lsp_tests.rs
+++ b/tests/integration/lsp_tests.rs
@@ -1409,11 +1409,13 @@ fn lsp_hover() {
#[test]
fn lsp_hover_asset() {
let context = TestContextBuilder::new().use_temp_cwd().build();
+ let temp_dir = context.temp_dir();
+ temp_dir.write("deno.json", json!({}).to_string());
let mut client = context.new_lsp_command().build();
client.initialize_default();
client.did_open(json!({
"textDocument": {
- "uri": "file:///a/file.ts",
+ "uri": temp_dir.uri().join("file.ts").unwrap(),
"languageId": "typescript",
"version": 1,
"text": "console.log(Date.now());\n"
@@ -1423,7 +1425,7 @@ fn lsp_hover_asset() {
"textDocument/definition",
json!({
"textDocument": {
- "uri": "file:///a/file.ts"
+ "uri": temp_dir.uri().join("file.ts").unwrap()
},
"position": { "line": 0, "character": 14 }
}),