3 ms·
THey are fast and cheap WHEN YOU FIRST WRITE THE CODE. Or, if you are the original author of the code. The problem is, and there will be people that disagree w
by AtlasBarfed 3y ago
THey are fast and cheap WHEN YOU FIRST WRITE THE CODE. Or, if you are the original author of the code.
The problem is, and there will be people that disagree with me, is that unit tests make refactoring of other people's code a lot harder.
STAY WITH ME!
If the unit tests were "good" and helped document what the code does, then they don't. You won't believe this, but in dogmatic high-breadth-coverage (low depth coverage), there are tons of test code that is SO TIED TO IMPLEMENTATION rather than interface than any monkeying of the presumed encapsulated logic breaks the unit tests, so you have double the things to fix.
You'll never believe what happens next. Some developer in some Agile thing that got assigned 2 unicorn shits for the task panics because the unit tests are SERIOUSLY slowing down his "velocity". So what does he do? Delete tests, change tests to make them work at any costs.