DEV Community

Discussion on: The tragedy of 100% code coverage

Collapse
 
meisekimiu profile image
Natalie Martin

When doing TDD I think it's important to treat your tests just as importantly as you treat your code. That means also applying the KISS and DRY principles when writing your tests. When I'm writing tests for a class or something, I'll usually write a test that I can instantiate the thing first, but after I have written the tests testing what the class actually does, I'll prune off all the pointless tests that served more as progress markers during the TDD process rather than actual, meaningful tests.

Collapse
 
danlebrero profile image
Dan Lebrero

That is a very mature and, in my experience, unusual practice. Congrats!