4 ms·
The article describes unit testing as any automated testing essentially. Specifically, encoding tests in code. That's OK for the purposes of this article. # 4
by betenoire 11y ago
The article describes unit testing as any automated testing essentially. Specifically, encoding tests in code. That's OK for the purposes of this article.
# 4 TESTABLE CODE IS BETTER WRITTEN CODE
Testable code is definitely better in the sense that it's easier to test... but depending on the style of the developer, it might be much harder to follow and understand holistically. Especially when working in 'inversion of control' environments.
# 5 TEST DESCRIPTIONS WORK AS DOCUMENTATION
This can be true, but unit tests don't necessarily differentiate between 'happy paths' and 'edge cases': the two types of tests sit side by side. In my experience, unit tests are _mostly_ edge cases. Still, I do find myself referring to tests as often as docs. Just wish it were better in this regard