Comment

Comment by tuxie_

Mocking has a place, which is not unit testing. If you find yourself mocking a dependency in a unit test you are not unit testing any more.

Those points of contact with 3rd parties should be clearly defined and encapsulated at the perimeter of your system. Mock at that level. Not when testing business logic.

parent tuxie_ 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton