4 ms·
When given a list of prototypes to code, writing the tests before starting helps me figure out specific edge cases and think about all the details the functions
by Kaivo 14y ago
When given a list of prototypes to code, writing the tests before starting helps me figure out specific edge cases and think about all the details the functions have to do before starting to code. Then, once I start coding the functions, it easily flows out and doesn't need as much refactoring afterward.
However, it's true that when refactoring and changing a lot of details here and there, I prefer to return type those tests afterward instead since a small change in a function can require a lot of change in the tests.