O'Reilly logo

Mastering jQuery by Alex Libby

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 14. Testing jQuery

To test or not to test, that's the question…

To paraphrase that world-famous detective, the answer to this question should be elementary!

If you've spent any time with jQuery, you will no doubt be aware of its unit: the need to test code, and that the most popular way is to use its testing library, QUnit. Throughout this chapter, we'll recap how to use it and then look at some of the best practices we should use as well as explore how we can really cut down our workflow effort, by automating the tests we perform on our code.

In this chapter, we'll cover the following topics:

  • Revisiting QUnit
  • Automated testing using NodeJS and RequireJS
  • Best practices when using QUnit

Are you ready to get stuck in? Let's get started…

Revisiting ...

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