plushie/testing/command_processor
Synchronous command processor for test backends.
Executes async, stream, done, and batch commands synchronously so that update side effects resolve immediately in tests. Widget ops, window ops, timers, and cancel are silently skipped (they need a renderer).
Since execution is synchronous, await_async returns immediately – commands have already completed by the time it is called.
Values
pub fn process_commands(
app: app.App(model, msg),
model: model,
commands: command.Command(msg),
max_depth: option.Option(Int),
) -> #(model, List(event.Event))
Process commands synchronously, threading model state through each update dispatch. Returns the final model and list of events processed.
max_depth controls recursion depth: None uses the default limit,
Some(n) uses n.