Write unit tests? Start deleting them
codeweavers.wordpress.com
codeweavers.wordpress.com
Enhancement, improvement and extension are all likely to break Unit Tests, because they can easily require that you change the way things currently work. In this case end-to-end tests are what you need, to make sure your system is producing the right results, including the new enhancements, but especially including the previous results.
In my experience, you can't make substantial improvements to a system with all Unit Tests in place and untouched.
Equally in my experience, with comprehensive Unit Tests you can refactor without fear, and constantly ensure your code is clean and ready for the next phase of development.
With good unit tests you can indeed refactor without fear, but we should not take the stance of never breaking any unit tests. Providing there is no functional change, break away! Such stance relies on end to end tests/pairing/some other process to ensure you are not breaking valid behaviour though.