Comment

Comment by bunderbunder

This is part of the reason that I've come to view mocks as a code smell. They're too easy to screw up.

But even more than that, I've found that modules that need to be tested with mocking can often be reorganized to be testable without mocking. And doing so tends to also make the code easier to understand and easier to modify without breaking things in the future.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton