count_emitted

Macro count_emitted 

Source
macro_rules! count_emitted {
    ($actions:expr, $pattern:pat $(if $guard:expr)?) => { ... };
}
Expand description

Count how many actions match a pattern.

§Example

use tui_dispatch::testing::count_emitted;

let actions = harness.drain_emitted();
assert_eq!(count_emitted!(actions, Action::Tick), 3);