Package module provides a test module that can be used in tests.
TestModule represents a bar.Module used for testing.
New creates a new module with the given testingT that can be used to assert the behaviour of the bar (or related modules).
AssertClicked asserts that the module was clicked and returns the event. Calling this multiple times asserts multiple click events.
AssertNotClicked asserts that the module received no events.
AssertNotStarted asserts that the module was not started.
AssertStarted waits for the module to start, or does nothing if the module is already streaming.
Close closes the module's channels, allowing the bar to restart the module on click.
Output queues output to be sent over the channel on the next read.
OutputText is shorthand for Output(bar.TextSegment(...)).
SkipClickHandlers configures the module to skip adding a default click handler on output. Setting this will break AssertClicked, but can be useful when comparing the output of this module in tests.
Stream conforms to bar.Module.