Hacker News new | ask | show | jobs
by notacoward 2073 days ago
The article does a good job identifying the problem with over-reliance on mocks (a problem I'm all too familiar with), but overlooks one important point. One of the most important kinds of testing is in the face of errors. With mocks, testing an error case is no different than testing a non-error case. With a fake, you need to add explicit error injection to get the same kind of coverage. It's no big deal, it's not usually hard to do, but the article's focus on only "happy path" testing makes it much weaker than it could have been.