← All repos

redux-mock-store

A mock store for testing Redux async action creators and middleware.

javascriptreduxtest
Browse cluster: OCaml Systems and Utilities
140commits
33contributors
1languages

Tech stack & purpose

redux-mock-store is a testing library for Redux that provides a mock store for testing async action creators and middleware. Built in JavaScript for the Redux state management library, it creates an array of dispatched actions to serve as an action log during tests. The library supports both synchronous and asynchronous actions, integrates with middleware like redux-thunk, and provides methods to retrieve dispatched actions and manage store state. However, the Redux team's deprecation notice indicates they no longer recommend this approach, suggesting instead that developers test using a real store to avoid issues like state not updating when actions are dispatched.

Languages

JavaScript
100.0%

Contributors (top 30 of 33)