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

Get Backbone.js Testing 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.