You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I'm not sure if I'm missing something, but from what I can see, one can't wire up the reducers in the same way you can with Redux. So, with this tool, you can only test what actions were fired, but you can't test the final state.
So to test final state, one needs to iterate through getActions() and pass each to the reducer being tested... why not simply include the ability to wire up reducers into the mock store?
then what's the point of getState() on the mockstore? it simply returns the initial state you set..
Please help me understand this?
The text was updated successfully, but these errors were encountered:
The README says this, and mentions alternatives that might fit what you are looking for (see #71 for more info).
A mock store for testing Redux async action creators and middleware. The mock store will create an array of dispatched actions which serve as an action log for tests.
Please note that this library is designed to test the action-related logic, not the reducer-related one. In other words, it does not update the Redux store. If you want a complex test combining actions and reducers together, take a look at other libraries (e.g., redux-actions-assertions). Refer to issue #71 for more details.
Hey
So I'm not sure if I'm missing something, but from what I can see, one can't wire up the reducers in the same way you can with Redux. So, with this tool, you can only test what actions were fired, but you can't test the final state.
So to test final state, one needs to iterate through getActions() and pass each to the reducer being tested... why not simply include the ability to wire up reducers into the mock store?
then what's the point of getState() on the mockstore? it simply returns the initial state you set..
Please help me understand this?
The text was updated successfully, but these errors were encountered: