provider_test library
A testing library which makes it easy to test providers.
Built after bloc_test package.
Functions
-
testProvider<
P extends ChangeNotifier> (String description, {FutureOr< void> setUp()?, required P build(), FutureOr<void> seed(P provider)?, FutureOr<void> act(P provider)?, Duration? wait, Map<Object Function(P provider), List< ? expect, FutureOr<Object> >void> verify(P provider)?, FutureOr<void> tearDown()?, dynamic tags}) → void -
Creates a new
provider
-specific test case with the givendescription
. testProvider will handle asserting that theprovider
changes its states to theexpect
ed states (in order) whileact
is executed. testProvider also ensures that no additional states are updated afteract
is executed by removing thelistener
added to the provider.