Chapter 2. Arming with testing and debugging

This chapter covers

  • Tools for debugging JavaScript code
  • Techniques for generating tests
  • Building a test suite
  • How to test asynchronous operations

Constructing effective test suites for your code is always important, so we’re going to discuss it now, before we go into any discussions on coding. As important as a solid testing strategy is for all code, it can be crucial for situations where external factors have the potential to affect the operation of your code, which is exactly the case we’re faced with in cross-browser JavaScript development.

Not only do we have the typical problems of ensuring the quality of the code, especially when dealing with multiple developers working on a single code base, ...

Get Secrets of the JavaScript Ninja 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.