reduxjs / redux-mock-store

A mock store for testing Redux async action creators and middleware.
MIT License
2.5k stars 148 forks source link

Add note that this is no longer recommended or maintained? #183

Closed fredrivett closed 2 weeks ago

fredrivett commented 1 year ago

It seems from the latest redux testing documentation that mocking the store is no longer recommended:

Prefer writing integration tests with everything working together. For a React app using Redux, render a with a real store instance wrapping the components being tested. Interactions with the page being tested should use real Redux logic, with API calls mocked out so app code doesn't have to change, and assert that the UI is updated appropriately.

Do not try to mock selector functions or the React-Redux hooks! Mocking imports from libraries is fragile, and doesn't give you confidence that your actual app code is working.

On top of that, this repo hasn't had any commits in over 2 years, and no issues have been raised in over 12 months, so it seems to me this project is no longer active.

This wasn't obvious to me, as many answers online still recommend this package and only reading through documentation myself did I realise this. I've since updated stack overflow questions to make this more obvious, but think it would also make sense to update the README to include a note that this project is effectively deprecated.

If the owners/maintainers agree, I'm happy to put in a PR for it as a starting point, or of course feel free to do so yourselves if you want to control the wording.

Thanks folks.