Tip 32 | Write Functions for Testability |
I had a literature professor who said that classes about writing donât include enough reading and classes about reading donât include enough writing. The same is true of code and tests: Books about code donât talk enough about testing and books about testing donât talk enough about composing code.
Time to fix that. Testing is important. If you donât do it, you should. It makes your code easier to refactor. It makes legacy code much easier to understand. And it generally results in cleaner, less buggy applications.
Most developers agree with this. Why then is testing neglected?
Itâs simple. Writing tests is hard. Or more accurately, many developers think writing tests is hard because they try ...
Get Simplifying JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.