Hacker News new | ask | show | jobs
by srtjstjsj 2077 days ago
> counting how many times

That's an expectation which is an extra optional layer on top of mocking. The important difference between mock and fake is that a separate mock has to be created for every single test, but a fake needs only be created once for all tests that use the faked dependency.