O'Reilly logo

Jasmine JavaScript Testing by Paulo Ragonha

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

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

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