1
vote
1answer
98 views

Unit test angularjs controller

I've been looking through countless SO post on this but can't get the unit test of my angular controller to work. Error: TypeError: Object #<Object> has no method 'apply' Error: [ng:areq] ...
0
votes
2answers
314 views

Mocking the event object in AngularJS event unit testing

I have the following test: it('Should keep location when user rejects confirmation', inject(function ($controller, $rootScope) { var confirmStub = sinon.stub(), eventStub = { ...