From 38ca4aab311be49ebe0bec4d032ae0f08ab726ad Mon Sep 17 00:00:00 2001 From: Keith Simmons Date: Thu, 30 Jun 2022 17:24:32 -0700 Subject: [PATCH] add assertion to test_definition ensuring no new language servers are created --- crates/project/src/project.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/project/src/project.rs b/crates/project/src/project.rs index 3fc90d87bc..adb9088ba6 100644 --- a/crates/project/src/project.rs +++ b/crates/project/src/project.rs @@ -7743,6 +7743,10 @@ mod tests { .await .unwrap(); + // Assert no new language server started + cx.foreground().run_until_parked(); + assert!(fake_servers.try_next().is_err()); + assert_eq!(definitions.len(), 1); let definition = definitions.pop().unwrap(); cx.update(|cx| {