3 ms·
Doing TDD isn't always about having 100% test coverage and as you described is often wasted. But having coverage in line with how "important/complex" that piec
by frankwiles 15y ago
Doing TDD isn't always about having 100% test coverage and as you described is often wasted. But having coverage in line with how "important/complex" that piece of code is wonderful, frees you to refactor more easily and saves you from writing throw away test code, and/or manual testing.
Like most things in life, it's about moderation. Do you need 80+% test coverage on your "tweet this" feature? No. Do you need 90+% test coverage of your signup and ecommerce process flows? Absolutely!
Don't get hung up writing trivial tests as you described above, instead focus on the things that really matter.