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 fixtures for Backbone.js views
Dealing with software/test development pitfalls and learning how to write testable code