-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
The examples currently have tests for components and reducers, but it does not have any integration tests, meaning we do not test that the different components / reducers are "wired" together. So, for example, if taking the counter example, I can change INCREMENT reducer and change it to be MY_INCREMENT, in production code and in reducer's test. My application is now broken, but all tests are green. I can even completely delete on reducer with its test and all tests are still green.
I think that those examples are really critical for a library as important as Redux (many people rely on it as an example of best practices).
I would expect to have proper examples with proper tests!
If we go back to the example that I showed before (counter example), I would expect to have a test that clicks an increment/decrement button and checks that ui is updated accordingly.
Another example of a problem in tests can be found here. I can (for example) completely remove this line, and tests will still be green... We have to test the main component as well!
And last thing - we still have a lot of examples missing tests / having partial tests. I see that we have a lot of volunteers to help with tests but it seems to get stuck somewhere. Real world example does not have tests, Todos example only test reducers and actions and so on...
I would love to help here with my experience in tests and would love to here what you have to say about that!