Nice article. I have recently discovered writing functional JavaScript combined with unit tests has proven a game changer in terms of reduced bugs and confidence in re use of functions.
Any level of automated test that would improve your confidence that you code is still correct and behaves as expected after the refactoring. This can include unit tests, but also higher level tests like integration or acceptance, and even performance and fault injection testing.
Nice article. I have recently discovered writing functional JavaScript combined with unit tests has proven a game changer in terms of reduced bugs and confidence in re use of functions.
When you say automated testing, what do you mean?
Any level of automated test that would improve your confidence that you code is still correct and behaves as expected after the refactoring. This can include unit tests, but also higher level tests like integration or acceptance, and even performance and fault injection testing.
Great thanks. Automated meaning somewhere along the CI/CD to run the tests.
Yes, ideally pre-merge. It could also be on your machine. Usually different levels of testing are run at different stages due to their cost / runtime.