News for hackers. Stuff that matters.
Re:Most Unit Testing Is Waste (2014) [pdf] by tsimionescu on Saturday June 29, 2019 @03:36PM (#20314344)
I don't think I've ever seen unit tests that didn't need to be changed fundamentally to deal with any sort of refactoring more complex than extracting a function.

Unit tests are supposed to work with the internals of a module and not just its boundaries. Since refactoring normally tries to significantly change the internals without changing the boundary, it usually also results in a rewrite of the unit tests. Integration tests are the ones that usually help me sleep better after a refactor.

Re:Most Unit Testing Is Waste (2014) [pdf] by nrook on Saturday June 29, 2019 @05:42PM (#20314970)
I don't think I agree with your premise, but even if I take it as true--- it's the unit tests of the other modules that help me out, by ensuring I haven't managed to totally bust the module I'm working on.

Some people argue that a unit test of a module should mock out its dependencies and not rely on them. For unit tests like that... well, I endorse the article.