redux-batch icon indicating copy to clipboard operation
redux-batch copied to clipboard

Add tests

Open arcanis opened this issue 7 years ago • 0 comments

Because of reentrance & whatnot, the code flow might be a bit hard to follow sometimes, and I would feel more confident if we had tests to validate that the behaviour doesn't break (or at least, that it breaks because bugs are being fixed).

A few things to test:

  • A regular action should dispatch a single notification
  • Two regular actions should dispatch two different notifications
  • An empty batched action should dispatch no notification
  • A batched action should dispatch a single notification
  • A batched action emitted from within a saga should dispatch a single notification
  • A batched action asynchronously emitted from within a saga should dispatch a single notification
  • Two actions asynchronously emitted from within a saga should dispatch two different notifications

I still have to think about a good reentrant test.

arcanis avatar Apr 17 '17 22:04 arcanis