aboutsummaryrefslogtreecommitdiff
path: root/helix-term/tests/test/helpers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/tests/test/helpers.rs')
-rw-r--r--helix-term/tests/test/helpers.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/helix-term/tests/test/helpers.rs b/helix-term/tests/test/helpers.rs
index 8755b60f..fb12ef12 100644
--- a/helix-term/tests/test/helpers.rs
+++ b/helix-term/tests/test/helpers.rs
@@ -319,6 +319,12 @@ impl AppBuilder {
}
}
+pub async fn run_event_loop_until_idle(app: &mut Application) {
+ let (_, rx) = tokio::sync::mpsc::unbounded_channel();
+ let mut rx_stream = UnboundedReceiverStream::new(rx);
+ app.event_loop_until_idle(&mut rx_stream).await;
+}
+
pub fn assert_file_has_content(file: &mut File, content: &str) -> anyhow::Result<()> {
file.flush()?;
file.sync_all()?;