Documentation
¶
Overview ¶
Package cmdtest runs tea commands in tests without waiting on timers.
A component's Update returns commands of two kinds: work that answers at once (a query, a focus request, a message) and timers that sleep first (a cursor blink, a spinner frame). Tests want the first and not the second. tuilib's own timers go through internal/tick, which tick.Instant makes return at once; timers from other libraries — bubbles' cursor blink — cannot be reached that way, so Run gives each command a moment and drops the ones still sleeping.
Index ¶
Constants ¶
View Source
const Grace = 20 * time.Millisecond
Grace is how long a command may take before Run treats it as a timer.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.