testing library
Test utilities for voo_watch_ui — install a fake transport without
the per-test boilerplate of constructing a FakeVooWatchTransport,
VooWatch.debugInstall-ing it, and resetting both singletons.
Classes
- FakeVooWatchTransport
-
In-process
VooWatchTransportfor widget tests and web/desktop hot-reload previews.
Functions
-
installFakeVooWatch(
{bool reset = true}) → Future< FakeVooWatchTransport> -
Installs a FakeVooWatchTransport as the
VooWatchsingleton's transport, so widget tests and unit tests can exercise watch-bound code without a real method channel. -
resetVooWatch(
) → Future< void> -
Tears down the
VooWatchand VooWatchUi singletons. Call fromtearDownafter installFakeVooWatch, or invoke withFakeVooWatch instead to skip manual teardown. -
withFakeVooWatch<
T> (FutureOr< T> body(FakeVooWatchTransport fake)) → Future<T> -
Runs
bodywith a FakeVooWatchTransport installed as the singleton's transport, then resets cleanly even ifbodythrows.