///| test "panic on waiting outside a task" { let dispatcher = TestDispatcher::new() let task = Executor::new(dispatcher).timer(1) // A coroutine that is not a task: `wait` cannot suspend it. run_async(() => { capture_cancellation(() => task.wait(), handler=() => ()) catch { _ => () } }) }