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 Thumbnail

eslint-plugin-hollow-tests

An ESLint plugin that catches tests that check nothing

Open Source
Developer Tools
GitHub
Visit WebsiteSee on Product HuntGithub ⧉Npm ⧉

Hunted bypiropiro

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.

Top comment

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!

Comment highlights

No comment highlights available yet. Please check back later!

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.

eslint-plugin-hollow-tests was featured in Open Source (69.1k followers), Developer Tools (523.3k followers) and GitHub (41.5k followers) on Product Hunt. Together, these topics include over 147.9k products, making this a competitive space to launch in.

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.

Want to see how eslint-plugin-hollow-tests stacked up against nearby launches in real time? Check out the live launch dashboard for upvote speed charts, proximity comparisons, and more analytics.