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


We introduced the Sinon.JS test library in this chapter and learned how to integrate spies in various testing scenarios. We investigated Chai's plugin architecture and used the Sinon-Chai adapter to write better test spy assertions. We wrote specs for the menu bar and single note Backbone.js views, completing our tests for the single note portion of the Notes application.

The next chapter continues our exploration of Sinon.JS by looking into stubs, mocks, and other useful fake testing objects. We will use these tools to fill out more parts of our Backbone.js application test collection and round out the fundamentals of writing tests with Mocha, Chai, and Sinon.JS.