Appendix B. Arming with testing and debugging

This appendix covers

  • Tools for debugging JavaScript code
  • Techniques for generating tests
  • Building a test suite
  • Surveying some of the popular testing frameworks

This appendix presents some fundamental techniques in developing client-side web applications: debugging and testing. Constructing effective test suites for our code is always important. After all, if we don’t test our code, how do we know that it does what we intend? Testing gives us a means to ensure that our code not only runs, but runs correctly.

Moreover, as important as a solid testing strategy is for all code, it can be crucial when external factors have the potential to affect the operation of our code, which is exactly the case ...

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