Pass a reference to TestAppContext in tests

This allows us to drop the context *after* we ran all futures to
completion and that's crucial otherwise we'll never drop entities
and/or flush effects.
This commit is contained in:
Antonio Scandurra 2022-03-01 12:01:02 +01:00
parent 8390f04e7d
commit 466db69780
20 changed files with 748 additions and 819 deletions

View file

@ -712,7 +712,7 @@ mod tests {
}
#[gpui::test]
async fn test_fake(mut cx: TestAppContext) {
async fn test_fake(cx: &mut TestAppContext) {
let (server, mut fake) = cx.update(LanguageServer::fake);
let (message_tx, message_rx) = channel::unbounded();