DEV Community

Discussion on: How much code coverage is enough?

justintervala profile image

I like this idea. Aiming for a high coverage is good, but it's equally if not more important that your tests are flexible and assert the right conditions. Simply because your test has hit a line of code doesn't imply that it has meaningfully tested that line of code. That being said, there is no chance that a line of code is tested if it isn't covered, so any changes to it could result in defects or issues refactoring.