While developing a feature having a quick check not only from a linter but also from a test tool is very helpful and should decrease the number of regressions introduced during development.
In order to run the tests a unit testing framework (e.g. jest) should be introduced and included into the webpack watch pipeline. To populate the test suite with an initial set of tests, those of our selenium tests, that don't test browser specific behaviour or don't rely on simulated user input should be refactored to unit tests
- unit tests are run on file change
- unit tests are run on CI build and before selenium
- selenium is only used where appropriate