From ed3086e4b129843c13a009112cf21dfd05745905 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 2 Feb 2022 18:02:59 -0500 Subject: refactor(lsp): remove circular dependency between `LanguageServer` and `DiagnosticsServer` (#13577) --- cli/tests/integration/lsp_tests.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cli/tests') 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::().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, -- cgit v1.2.3