Have you ever spent an entire afternoon writing a unit test for a five-line setup component?
You mock three context providers, an Auth.js session hook, and a router adapter—only to assert that a button renders in the DOM. At that point, it’s worth asking:
Are we testing our application, or just testing our mocks?
In React applications, not every file benefits equally from isolated unit tests—but figuring out which ones those are isn't always obvious. Over time, I’ve moved away from chasing high coverage numbers for its own sake toward a more pragmatic framework for balancing unit tests (with Vitest or Jest) and End-to-End integration tests (with Playwright).
Here is how I think about testing wiring code without grinding developer velocity to a halt.






