Summary

In this chapter, we dug into the Chai and Mocha test frameworks, starting with a tour of testing interfaces. We explored the many assertion statements available in Chai, then examined the creation of full Mocha test suites with setup/teardown, application configuration, and test specifications for Backbone.js components. Finally, we reviewed debugging tips and guidelines for a more test-friendly software development lifecycle.

At this point, our application has starting test coverage for some Backbone.js models, collections, and views. We will continue covering different parts of our Backbone.js application while introducing new topics in the subsequent chapters and work up to a final application test collection that aggregates all of our ...

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.