DEV Community

Discussion on: Is testability a reason to change your design?

 
codemouse92 profile image
Jason C. McDonald

The "bus factor" is my motive for leaving extensive intent inline comments and external documentation. Tests shouldn't have to be used to recreate intent, which is the ingredient from which we recreate code. In fact, I'd even say that having to recreate intent from tests is only slightly less soul-sucking than recreating from raw code. Therefore, I'd say it's a terrible motive to writing tests.

That said, yes, tests are virtually always something you should have as part of your code base.