Hacker News new | past | comments | ask | show | jobs | submit login

Mocks mean your code is too tightly coupled. You should be able to unit test your code by creating only fake data.

Things like dependency injection increase coupling to the point where you have to mock. Avoid dependency injection and other complexity within complexity features.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: