O'Reilly logo

Backbone.js Testing by Ryan Roemer

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 3. Test Assertions, Specs, and Suites

With a Backbone.js application integrated into our budding test infrastructure and a rough test plan underway, we will now begin expanding our application's test coverage. In this chapter, we will introduce some fundamental testing tools and test more parts of the Backbone.js application in the following topics:

  • Surveying the Mocha and Chai test library interfaces and styles
  • Introducing the Chai assertion library API
  • Configuring the Mocha runner and the Backbone.js application for tests
  • Aggregating Mocha specifications into test suites and preparing test state
  • Writing test specifications in Mocha, beginning with Backbone.js collection specs
  • Testing asynchronous application code
  • Writing specs and HTML test ...

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