test<T, E extends Object> static method
ReduxNotifierTester<T>
test<T, E extends Object>({
- required ReduxNotifier<
T> redux, - bool runInitialAction = false,
- T? initialState,
Returns a debug version of the notifier
where
you can set the state directly and dispatch actions
Usage: final counter = ReduxNotifier.test( redux: Counter(), initialState: 11, );
expect(counter.state, 11); counter.dispatch(IncrementAction());
Implementation
static ReduxNotifierTester<T> test<T, E extends Object>({
required ReduxNotifier<T> redux,
bool runInitialAction = false,
T? initialState,
}) {
return ReduxNotifierTester(
notifier: redux,
runInitialAction: runInitialAction,
initialState: initialState,
);
}