3 ms·
> What's the point of adding regression tests to spaghetti code? All you're doing is making it an even bigger pain in the ass to refactor Refactoring is changi
by mattm 9y ago
> What's the point of adding regression tests to spaghetti code? All you're doing is making it an even bigger pain in the ass to refactor
Refactoring is changing the code to make it more understandable while keeping the functionality the same. That is the perfect time to add tests. Adding tests before refactoring will help someone understand the code first and will also let you know if you've broken something.