Most Unit Tests Are a Waste of Time, but You Need to Write Them Anyway

Yes, I&rsquo;m saying it, most unit tests feel like a waste of time . You write loads of them. They break when you refactor. They rarely catch real bugs. When you change implementations, you delete the tests. And when your build fails, it’s usually because a mocked method didn’t behave as expected — not because your code actually broke. So why do we keep writing them? Because while most unit tests…