Skip to content
← The curriculum

The coverage trap

A suite with 100% line coverage and a mutation score of zero. Once you have seen it, the badge never reads the same way again.

Here is a function that turns a count into a word. Four lines, one comparison, nothing clever.

Below it is a suite that achieves 100% line coverage. Every line executes. Every branch is taken. By the standard most teams measure themselves against, this module is fully tested.

1 of 7