BB.Test.AsyncCommand (bb v0.15.2)

Copy Markdown View Source

A test command that waits for an explicit :complete message before finishing.

Usage: {:ok, cmd} = Runtime.execute(Robot, :async_cmd, %{notify: self()}) assert_receive {:executing, ^cmd} # ... do stuff while command is running ... send(cmd, :complete) assert {:ok, :completed} = BB.Command.await(cmd)