3 ms·
"my team told me the tests are more complex than the actual code. (This team is not the original team that wrote the code and unit tests. Therefore some unit te
by hacker_9 9y ago
"my team told me the tests are more complex than the
actual code. (This team is not the original team that wrote the code and unit tests. Therefore some unit tests take them by surprise. This current team is more senior and disciplined.)"
Despite the inflammatory title, the point the PDF is making I believe is that unit tests should be kept short and simple, and convey the intent of your code.
Intent is akin to the 'why' - written code explains the 'how' and 'what' extremely well, but without the 'why' it loses all meaning. Writing tests to convey intent is essential because no computer or programming language can do this for us currently, so it's left up to us.
- abritinthebay 9y agoYes, I agree. Unit tests should test the smallest unit of work and build like LEGO bricks. What the Article describes are tests but I would not call them unit tests.