Testing Backbone.js components with spies

With our Sinon.JS spies and other utilities ready, we will begin spying on our Backbone.js application. In this section, we will introduce and test two Notes application views—the menu bar view and the single note view.

Tip

Working through the examples

Reiterating a point from the previous chapter, we will present the menu bar view and single note view implementations with the code first and the tests second, to help maintain a narrative structure that properly introduces the Notes application (and to keep things brief). This is not the preferred order for actual test development.

Accordingly, while working through this chapter, we suggest that you put this book down for a moment after reading the described ...

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.