Chapter 10. Patterns for Testing
All throughout this book, we've been pushing the idea that JavaScript is no longer a toy language with which we can't do useful things. Real-world software is being written in JavaScript right now and the percentage of applications using JavaScript is only likely to grow over the next decade.
With real software comes concerns about correctness. Manually testing software is painful and, weirdly, error prone. It is far cheaper and easier to produce unit and integration tests that run automatically and test various aspects of the application.
There are countless tools available to test JavaScript. From test runners to testing framework, the ecosystem is a rich one. We'll try to maintain a more or less tool-agnostic approach to testing in this chapter. This book does not concern itself with which framework is the best or friendliest. There are overarching patterns that are common to testing as a whole. It is those that we'll examine...