Chapter 7. Testing Backbone.js Applications

Testing Backbone applications is no different than testing any other application; you are still going to drive your code from your specs, except that Backbone is already leveraging a lot of functionality for you, for free. So expect to write less code, and consequently less specs.

Backbone is a micro framework designed to give web applications just enough structure to allow them to grow. It provides four base abstractions:

  • Model: It provides a key-value store for the application data along with custom events
  • Collection: It provides a rich enumerable API
  • View: It creates the interface building blocks
  • Router: It provides methods for client-side routing

We will see some common testing scenarios when dealing with ...

Get Jasmine JavaScript Testing now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.