Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

14. QUnit

Chapter 14. QUnit

QUnit is a powerful JavaScript test suite written by jQuery team member Jörn Zaefferer and used by many large open source projects (such as jQuery and Backbone.js) to test their code. It’s capable of testing both standard JavaScript code in the browser and code on the server side (where supported environments include Rhino, V8, and SpiderMonkey). This makes it a robust solution for a large number of use cases.

Quite a few Backbone.js contributors feel that QUnit is a better introductory framework for testing if you don’t wish to start off with Jasmine and BDD right away. As we’ll see later on in this chapter, QUnit can also be combined with third-party solutions such as SinonJS to produce an even more powerful testing solution supporting spies and mocks, which some say is preferable over Jasmine.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial