Code Coverage
ELI5 — The Vibe Check
Code coverage is the report card for your tests. It shows you a map of your code and highlights which lines got tested (green) and which didn't (red). Seeing red lines is like seeing missed questions on a test — you know what to fix.
Real Talk
Code coverage is a metric that quantifies what proportion of your codebase is exercised during testing. Tools like Istanbul (nyc), V8 coverage, or Jacoco generate HTML reports showing covered vs uncovered lines. Branch coverage is often more meaningful than line coverage.
When You'll Hear This
"Check the code coverage report — the payment module is at 30%." / "Don't chase 100% code coverage blindly; focus on critical paths."
Related Terms
CI Testing
CI Testing is running all your tests automatically every time someone pushes code.
Coverage
Coverage tells you what percentage of your code is actually tested. 80% coverage means 80% of your lines are touched by at least one test.
Test Suite
A test suite is just a collection of related tests grouped together.
Unit Test
A unit test is like checking that one single LEGO brick isn't broken before you use it in your big castle.