3 ms·
Seconding the "you want a GREEN light to start." When you're dealing with legacy, untested code like this, you're sometimes going to write a test that by all ac
by fournm 13y ago
Seconding the "you want a GREEN light to start." When you're dealing with legacy, untested code like this, you're sometimes going to write a test that by all accounts should be RED, but it'll come up GREEN.
And the problem then becomes "okay, now, which of the other 16,000 untested files in this codebase are relying on that broken behavior." It's not a fun place to be in (welcome to my day job) but you have to remember--You're writing characterization tests, you're trying to capture what it currently does. Not what it should--every difference between those two is, unfortunately, potentially an important one.
It's not worth fixing one minor thing if it breaks 14 other things down stream (that you then won't catch, since they also don't have tests).