3 ms·
I am thinking of any fast unit test system. Going in seconds from red to green is a thrill.
by danuker 4y ago
I am thinking of any fast unit test system. Going in seconds from red to green is a thrill.
- TeMPOraL 4y agoUnit tests suck at being documentation, and are not a good substitute for the "why" comment. They can catch some mistakes you make with the code under test, but they can't tell you why it is the way it is. At best, they can help you guess, at the cost of having to study the test code itself (which is usually much bigger than the code it tests, and often more complicated). But the thing is, the knowledge of "why" is most valuable to have before you start making changes and break some tests.
- dhosek 4y agoThis is true, test coverage, especially in code that has to interact with other systems in particular ways will often have ten lines of setup that only matters in the test for every line of actual verification.