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

That strict definition of “unit” testing (advocating for isolationism and banning collaboration with dependencies) is too narrow for my taste. DI can make a lot of sense, but I don’t think that means you have to mock everything (inviting a maintenance cost) for the sake of purity.

Here’s Fowler’s take: https://martinfowler.com/bliki/UnitTest.html



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: