Book Image

Backbone.js Testing

By : Ryan Glenn Roemer
Book Image

Backbone.js Testing

By: Ryan Glenn Roemer

Overview of this book

Table of Contents (13 chapters)
Backbone.js Testing
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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

In the next chapter, we will get more familiar with the Sinon.JS library. We will use test spies to verify program behavior and introspect how functions are called and respond within a Backbone.js application.