moj-frontend icon indicating copy to clipboard operation
moj-frontend copied to clipboard

Add unit tests to components using JavaScript

Open gregtyler opened this issue 4 years ago • 0 comments

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.

gregtyler avatar Jan 08 '21 16:01 gregtyler