3 ms·
My problem with "100% coverage" is Goodhart's law ( https://en.wikipedia.org/wiki/Goodhart%27s_law https://en.wikipedia.org/wiki/Goodhart%27s_law ). Keep addin
by chriswarbo 8y ago
My problem with "100% coverage" is Goodhart's law ( https://en.wikipedia.org/wiki/Goodhart%27s_law https://en.wikipedia.org/wiki/Goodhart%27s_law ).
Keep adding tests as long as they tell us something new, give us more confidence, document some regression, etc.
Keep adding tests if they're exposing edge cases (e.g. MAX_INT), even if those code paths are already covered.
Keep adding tests if they're asserting useful things about the results, even if those code paths are already covered.
Stop adding tests when you're only trying to make the coverage number increase.