Concept: Coverage Types
Concept Check Medium
Question
Branch coverage measures:
Hint
Branch = each possible path of an if/else.
Explanation
Branch coverage measures how many conditional branches (true and false paths of if/else, switch, ternary) were exercised by tests. It's stricter than line coverage — you can have 100% line coverage but miss a branch (e.g., only testing the true path of an if statement). Branch coverage ensures both paths are tested.
Related Resources
Related Lessons
- Test Coverage
Measuring and interpreting coverage.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.