moj-frontend
moj-frontend copied to clipboard
Add unit tests to components using JavaScript
Summary
It would be helpful to add unit tests to this repo for all components which use JavaScript. These would be evaluated as part of the build process to ensure changes don't introduce regressions.
Motivation
When making changes to components' JavaScript code it can be hard to know if you're introducing a regression. A test suite would provide a way of automatically detecting this as well as a written contract of what a component should do.
Describe alternatives you've considered
I don't think there's really an alternative, but we should also add visual regression tests (#133) to ensure the non-JavaScript components are degraded in future changes.