This product was not featured by Product Hunt yet. It will not be visible on their landing page and won't be ranked (cannot win product of the day regardless of upvotes).
Product upvotes vs the next 3
Waiting for data. Loading
Product comments vs the next 3
Waiting for data. Loading
Product upvote speed vs the next 3
Waiting for data. Loading
Product upvotes and comments
Waiting for data. Loading
Product vs the next 3
Loading
eslint-plugin-hollow-tests
An ESLint plugin that catches tests that check nothing
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.
Hi Product Hunt! The existing rules flag a test with no expect() at all, but miss the subtler case: an expect inside an if or a loop over an empty array, so the test passes without checking anything. This plugin catches those too, and follows assertions into helpers in the same file. Feedback welcome!
About eslint-plugin-hollow-tests on Product Hunt
“An ESLint plugin that catches tests that check nothing”
eslint-plugin-hollow-tests was submitted on Product Hunt and earned 0 upvotes and 1 comments, placing #272 on the daily leaderboard. 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.
On the analytics side, eslint-plugin-hollow-tests competes within Open Source, Developer Tools and GitHub — topics that collectively have 633.9k followers on Product Hunt. The dashboard above tracks how eslint-plugin-hollow-tests performed against the three products that launched closest to it on the same day.
Who hunted eslint-plugin-hollow-tests?
eslint-plugin-hollow-tests was hunted by piro. A “hunter” on Product Hunt is the community member who submits a product to the platform — uploading the images, the link, and tagging the makers behind it. Hunters typically write the first comment explaining why a product is worth attention, and their followers are notified the moment they post. Around 79% of featured launches on Product Hunt are self-hunted by their makers, but a well-known hunter still acts as a signal of quality to the rest of the community. See the full all-time top hunters leaderboard to discover who is shaping the Product Hunt ecosystem.
For a complete overview of eslint-plugin-hollow-tests including community comment highlights and product details, visit the product overview.