summaryrefslogtreecommitdiff
path: root/cli/tests/integration/lsp_tests.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-02-02 18:02:59 -0500
committerGitHub <noreply@github.com>2022-02-02 18:02:59 -0500
commited3086e4b129843c13a009112cf21dfd05745905 (patch)
tree92e7b035e2d302bd4cc0a9f1c4e8b2964a09eb83 /cli/tests/integration/lsp_tests.rs
parentde5a4a1757d1f816c594cb0fe7426a5c738f0abb (diff)
refactor(lsp): remove circular dependency between `LanguageServer` and `DiagnosticsServer` (#13577)
Diffstat (limited to 'cli/tests/integration/lsp_tests.rs')
-rw-r--r--cli/tests/integration/lsp_tests.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/cli/tests/integration/lsp_tests.rs b/cli/tests/integration/lsp_tests.rs
index 12c50e757..f0e6faa6b 100644
--- a/cli/tests/integration/lsp_tests.rs
+++ b/cli/tests/integration/lsp_tests.rs
@@ -57,6 +57,11 @@ where
.write_notification("textDocument/didOpen", params)
.unwrap();
+ handle_configuration_request(client);
+ read_diagnostics(client).0
+}
+
+fn handle_configuration_request(client: &mut LspClient) {
let (id, method, _) = client.read_request::<Value>().unwrap();
assert_eq!(method, "workspace/configuration");
client
@@ -70,8 +75,6 @@ where
}]),
)
.unwrap();
-
- read_diagnostics(client).0
}
fn read_diagnostics(client: &mut LspClient) -> CollectedDiagnostics {
@@ -490,6 +493,7 @@ fn lsp_import_assertions() {
}),
)
.unwrap();
+ handle_configuration_request(&mut client);
let diagnostics = CollectedDiagnostics(did_open(
&mut client,