Add more tests
Frontend doesn't have enough unit testing. These are the parts that should be tested in priority:
State
- [ ]
video_debate/comments/reducer.js - [ ]
video_debate/comments/selectors.js - [ ]
video_debate/statements/reducer.js - [ ]
video_debate/statements/selectors.js - [ ]
video_debate/video/reducer.js
Components
TODO
I would like to work in this 👍
Hey @FacuRossi a PR for these would be greatly appreciated :slightly_smiling_face:
You can get an example of how we test reducers with https://github.com/CaptainFact/captain-fact-frontend/blob/staging/app/state/video_debate/comments/tests/reducer.spec.js
Another example for components snapshots: https://github.com/CaptainFact/captain-fact-frontend/blob/staging/app/components/Utils/Message.jsx
Frontend test coverage is still way below what it should be, and overall very immature. If you want to add new libraries or bring your own practices feel free to suggest some. Adding a Storybook for example would be really useful.
If you're wondering what this spapshotReducer function is, please get a look at https://github.com/CaptainFact/captain-fact-frontend/blob/staging/dev/tests_setup.js