1

My code is as below:

angular.extend($scope, {
    refreshQueries: function() {
        //code to refresh the tab.......
    },
    queriesTab: {
       tab: 'queryTab',
       refreshFunc: $scope.refreshQueries,
       refreshInterval: 5
    }
 });

I want to check using jasmine whether I am able to switch the tab or not.. Basically wanted to spyon 'refreshFunc' of queriesTab tab.. How can I do that?

Not able to to spyon using below syntax in jasmine test case.var queriesFunc = spyOn(scope.queriesTab,'refreshFunc');

ArK
  • 20,698
  • 67
  • 109
  • 136
Nikesha
  • 47
  • 2
  • `angular.extend` is an utility function, I am not sure that you should test how it was called, but the result of that call. What error do you get when creating a spy? – Michael Radionov Jul 08 '15 at 07:23

0 Answers0