From the course: Node.js: Testing and Code Quality

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Fallacies of 100% test coverage

Fallacies of 100% test coverage

- [Instructor] An often held, but mistaken belief, is that 100% test coverage means that software is perfect. Should you try for 100% test coverage? Yes, but with a huge caveat. 100% test coverage does not mean that your application is bug-free, especially if you designed your tests to conform to the buggy application. 100% test coverage does not mean that you wrote good tests. It just means that your tests didn't fail. 100% test coverage could mean that your tests were not properly isolated, so unexpected behavior could still occur. Practically, a user of the system can't use 100% test coverage because it does not deliver new functionality. Finally, 100% test coverage is not a substitute for peer code review. Okay, without out of the way, what does 100% test coverage look like? Rather than dragging you through writing a number of digital tests, I've gone ahead and done the work already. If you really want to learn…

Contents