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

Agreed on the testing fetish and usually they're not valuable. Uncle Bob wrote about this last year and its something I wish everyone would read https://blog.cleancoder.com/uncle-bob/2017/10/03/TestContrav...


Yes, bad tests are bad. Yes, mocks are bad. Good tests, however, are good.

To expound on that, designing for testability allows you to sidestep the need for mocks almost entirely, and forces you into easier, more reliable and more consistent code. Then when you choose to test it, the tests are simple, straightforward and valuable.




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

Search: