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 theproviderchanges its states to theexpected states (in order) whileactis executed. testProvider also ensures that no additional states are updated afteractis executed by removing thelisteneradded to the provider.