1
I am getting an error by performing the following test:
it('testing if the onStateChangeErrorHandle function is defined', function(){
expect(rootScope.$on).toBeDefined();
srv.onStateChangeError({$rootScope: rootScope});
});
ERROR:
Typeerror: Undefined is not an Object (evaluating 'rootScope. $on')
And I don’t understand why.
defined rootScope before? if you don’t use $rootScope
– Felipe Duarte
@Felipeduarte is set yes. rootScope = $rootScope;
– Aléxia