Testing a Redux store
summary
An assertion library extension is built that creates a real store with a test middleware so dispatched actions and state transitions are observed end to end including saga side effects; it adds an eventually assertion for async actions plus a partial state matcher and ordered-state checks. Tests dispatch an action and wait for specific actions and states to appear; this setup runs against production code for about a year and now covers all Redux tests at the company.
AI-written summary · about
chapters (14)
- 0:00Testing Redux stores
- 1:08Redux store example
- 2:56Testing Redux reducers
- 4:20Redux middleware testing
- 6:49Requirements for Redux testing
- 7:53Custom Chai helper for Redux
- 9:01Async actions with eventually
- 9:44State transitions with partial comparisons
- 10:47Ordered state transitions
- 11:29Benefits of new testing
- 12:11Documenting store behavior
- 12:54Open sourcing solution
- 13:17Extending to other libraries
- 13:38Q&A








