O'Reilly logo

Backbone.js Testing by Ryan Roemer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required