Chapter 15. Legacy JavaScript
Michael Feathers defines legacy code as code without tests [WEwLC]. JavaScript and other dynamic languages benefit from tests by exercising a wider range of the dynamic behaviors that sometimes make them behave in unanticipated ways. Open-source projects benefit from tests so that multiple contributors can make changes without each having to be intimately familiar with all behaviors.
In contrast, open-source JavaScript projects without tests survive through simplicity or a small number of immersed maintainers, and often both. Increasingly, open-source JavaScript projects include tests, but some very useful and popular projects remain without them.
The jQuery Timepicker Addon1 by Trent Richardson is one such project. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access