3 ms·
I think the big issue is. Are you writing a lib or an app? In library you don't need to mock. Library is supposed to be agnostic. In app there are many layers
by Ygg2 4y ago
I think the big issue is. Are you writing a lib or an app?
In library you don't need to mock. Library is supposed to be agnostic.
In app there are many layers. You kinda need to mock them all, otherwise your app can't be tested.
And then you have the problem that minor changes turn your tests red.
So mocking is most useful in the place it has almost no impact.
https://youtu.be/VDfX44fZoMc https://youtu.be/VDfX44fZoMc
- Ygg2 4y agoClarification of link: one solutions to unit tests is to write even more unit test, with some contract tests, etc. Another approach is to treat integration test as a unit test.