Hacker News new | ask | show | jobs
by zahlman 656 days ago
>I hit a case where I actually test nothing and have no results. Did I pass?

All your tests passed. After all, none failed, right?

https://en.wikipedia.org/wiki/Vacuous_truth

1 comments

All the tests also failed, because none passed. Both are true but most people only find out all the zero tests passed because that's the question asked.

If someone wants to consider running zero tests a failure they need to pose the right question for their context.