O'Reilly logo

Secrets of the JavaScript Ninja by John Resig and Bear Bibeault

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required