I don’t believe I have to say that Unit tests are good for you
medium.com
medium.com
Regression testing
In my experience in a heavily tested code base (unit and integration), this is more of the role of integration tests. However unit tests are ultra valuable for code that has few dependencies. The higher you go in the stack the muddier it seems to get.I've heard this reasoning before. The math is simple but wrong. The cost of writing unit tests must also include the time spent on tests of stuff that was never broken; and for the maintenance of tests that break because of new features or bug fixes rather than actual code issues.
Unit tests are very useful, essential, in some situations. In others they're a waste of everybody's time.