3 ms·
Do you retrofit tests to old code? If so how do you deal with spaghetti that at first glance appears almost untestable, insist on a refactor?
by jiggy2011 14y ago
Do you retrofit tests to old code? If so how do you deal with spaghetti that at first glance appears almost untestable, insist on a refactor?
- Swizec 14y agoThey usually want me to fix old code ... exploratory tests are really the only way to do that. It helps that I write integration/functional tests almost exclusively (unit tests are imho useful only for algorithms, which is not what I'm usually working on). I mean, I can either spend 20min writing a test, or 5min clicking around the app every time I change something ...