send method

void send(
  1. Action action, {
  2. void expected(
    1. State
    )?,
})

Dispatches an action and optionally asserts the resulting state via expected.

testStore.send(
  CounterAction.increment,
  expected: (state) => expect(state, 1),
);

Implementation

void send(Action action, {void Function(State)? expected}) {
  _store.send(action);
  expected?.call(_store.state);
}