This expanded edition teaches mocks, stubs and dependency injection in functional, modular and object oriented style.
The Art of Unit Testing, 3rd Edition
with Examples in JavaScript
The Art of Unit Testing, Third Edition updates an international bestseller to reflect modern development tools and practices.
You'll explore test patterns and organization, working with legacy code, and even "untestable" code. The many tool-agnostic examples are presented in JavaScript, and are carefully designed so that they apply to code written in any language.