Back to products
e

PRODUCT DETAILS

eslint-plugin-hollow-tests

An ESLint plugin that catches tests that check nothing

Launch date · UTC
2026-11-12
Domain
—
Domain ending
—
Category
Developer tools

About this product

A test with no assertion passes forever, and so does one whose assertions sit inside a branch that never runs. eslint-plugin-hollow-tests reports both: tests with no assertion at all, and assertions only inside if, the conditional operator, &&, ||, ??, switch, catch or a loop that may run zero times. Loops known to run at least once count as outside, and assertions moved into a helper are followed automatically within the file. Works with your existing test framework. Free and open source.

Keywords

lintingStatic Analysisunit testing