in reply to Cleaning up Code
A test suite really helps when refactoring code.
You may be able to add tests to just this area of the code, depending on how much this code depends on the code around it.
If this code depends on code in lots of places, then adding tests would be harder. The tests help because you add them, change the code (refactor) and then run the tests to see if any test fails.
Knowing what to test and how much to test takes experience.
|
|---|