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
From the course: Node.js: Testing and Code Quality
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Why code coverage matters5m 22s
-
(Locked)
Measuring code coverage with Jest5m 54s
-
(Locked)
Functional testing with Jest4m 1s
-
(Locked)
Test doubles and Express apps5m 53s
-
(Locked)
Form submissions with SuperTest6m 9s
-
(Locked)
Fallacies of 100% test coverage4m 19s
-
(Locked)
Coverage with continuous integration4m 34s
-
(Locked)
Challenge: Isolate routes for faster tests39s
-
(Locked)
Solution: Isolate routes for faster tests9m 27s
-
(Locked)
-