Unit testing is more than just a collection of tools and practices—it’s a state of mind! This bestseller reveals the master’s secrets for delivering robust, maintainable, and trustworthy code.
Thousands of developers have learned to hone their code quality under the tutelage of
The Art of Unit Testing. This revised third edition updates an international bestseller to reflect modern development tools and practices, as well as to cover JavaScript.
Inside
The Art of Unit Testing, Third Edition you will learn how to:
- Create readable, maintainable, and trustworthy tests
- Work with fakes, stubs, mock objects, and isolation frameworks
- Apply simple dependency injection techniques
- Refactor legacy code with confidence
- Test both frontend and backend code
Effective unit tests streamline your software development process and ensure you deliver consistent high-quality code every time. With practical examples in JavaScript and Node, this hands-on guide takes you from your very first unit tests all the way to comprehensive test suites, naming standards, and refactoring techniques. 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 carefully designed so that they apply to code written in any language.