3 ms·
>>The least useful tests are the ones for cases you know not to invoke, because they are obvious. Maybe you know not to invoke them because you wrote those fea
by enraged_camel 10y ago
>>The least useful tests are the ones for cases you know not to invoke, because they are obvious.
Maybe you know not to invoke them because you wrote those features, but what about the rest of the team? Or the poor schmuck who takes over your codebase after you leave?
Test cases help future-proof your code against the unknowns and the unexpected. I think of them as guard rails on a path. When the path is on straight terrain, they aren't necessary. When it is crossing the side of a cliff though, you're glad they're there.