2 ms·
Depends on how you write your code. If your functions have lots of hidden dependencies and side-effects, it’s hard to test. If you split concerns properly and
by ratww 5y ago
Depends on how you write your code.
If your functions have lots of hidden dependencies and side-effects, it’s hard to test.
If you split concerns properly and keep your glue/IO code separated from the decision-making/business-rules/logic, mocking is quite trivial, and there are advantages other than just testability.
Check out this talk to see examples of that in action: https://www.destroyallsoftware.com/talks/boundaries https://www.destroyallsoftware.com/talks/boundaries