
eslint-plugin-hollow-tests
By piroCreated on Nov 11, 2026
Product Hunt
An ESLint plugin that catches tests that check nothing
AI Insights
This helps JavaScript developers detect meaningless test cases that pass silently due to missing or unreachable assertions.
Open SourceFreeAudience: independent developersAlternative: eslint-plugin-jest
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.