Testing Promises with Jasmine - Provide and Spy Jasmine provides a few more tools when dealing with promises. Consider the following controller: angular.module("myApp.store").controller("StoresCtrl", function($scope, StoreService, Contact) { StoreService.listStores().then(function(branches) { Contact.retrieveContactInfo().then(function(userInfo) { //more code here crossing user and stores data });
{{#tags}}- {{label}}
{{/tags}}