Comment

Comment by war1025

> If your code base utilizes dependency injection to make the code more "testable" with mocks, you are making the code 10x worse.

I don't know that I'd word it exactly like that, but one thing I've found over the years is any tests we have that rely on mocks basically just don't test anything at all.

If your whole test is "This gets called, then that, then that", you aren't actually writing a test. You're repeating what the code already says.

parent war1025 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton