I deleted a condition from a library with 100% coverage. CI stayed green.
I deleted !arrays || from a guard in radashi , a TypeScript utility library that gates CI on 100% line and branch coverage: // before if ( ! arrays || ! arrays . length ) { // after if ( ! arrays . length ) { Then I ran their actual CI command, pnpm test . All 911 tests passed. Coverage still reported 100% lines and 100% branches — including on unzip.ts , the file I had just edited. That isn't a…
The author removed a condition from a guard in a TypeScript utility library called radashi, which uses 100% line and branch coverage as a CI gate. After deleting the condition, the CI command pnpm test passed all 911 tests, and coverage remained at 100% for lines and branches. The library's coverage metric tracks operand evaluation frequency, not decision-making.
Radashi enforces thresholds and gate CI based on these thresholds. The author found that a team using radashi could delete a condition without affecting coverage, indicating a problem with the metric. The author wrote DeepCover to score whether tests truly verify the code. The tool uses a coding agent to analyze the code, identify gaps in testing, and provide sub-scores.
In the radashi case, about a third of the function states had no tests, and the author inserted a throw statement to reveal these gaps. The team could still toggle or append falsy values without the tests covering them. Despite finding the bug, the team continued to gate CI on 100% coverage, missing the critical test for undefined elements.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.