Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: