Comment

Comment by lochlan

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

parent lochlan 9 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton