test_utils: add EventTracker.conusme_events()

This commit is contained in:
link2xt
2022-08-20 14:12:22 +00:00
parent 54df44d930
commit 84ae27744a

View File

@@ -856,6 +856,11 @@ impl EventTracker {
})
.await
}
/// Consumes all pending events.
pub async fn consume_events(&self) {
while self.try_recv().is_ok() {}
}
}
/// Gets a specific message from a chat and asserts that the chat has a specific length.