2 ms·
As someone that has written thousands of tests - what I disagree with you on is when writing unit tests those application components should have their own tests
by winrid 7y ago
As someone that has written thousands of tests - what I disagree with you on is when writing unit tests those application components should have their own tests. Then you can cleanly mock them. Even if they are utilities etc.
Same goes for application code in the same service or whatever. Mock those calls and only test your unit of code.
If you don't do this things can be fine. But at some point the code base will become unwieldy and changing code in one place will break tests all over the place.
Integration tests are fine and they have their place but are not a substitute for proper unit tests.