Getting started with unit testing your Angular code can be tricky due to setting up your test runner, learning some of the conventions, and figuring out how dependency injection works with your tests. One of the first things you will probably want to test are your services. There are two ways to inject services into your unit tests.
This article was updated on 4/15/15 to reflect Jasmine 2.x and updated again on 1/2/16
Backbone.View that abstracts this away for you.
One of the difficult parts I am experiencing when working with Backbone is separating out display logic properties from models. Let’s look at a simple example where we display a user model in a view and allow the user’s email address to be edited.