1

My angular js unit tests appear to fail whenever i try to use

scope.$digest();

Or

$httpBackend.flush();

The tests fail and flag the following error -

TypeError: 'undefined' is not a function (evaluating '$browser.$$checkUrlChange()')

The two dont appear to be related in anyway, one propagates the asynchronous execution of backend api calls and the other re-evaluates the scope model.

I have tried executing my tests using both phantomjs and chrome browsers.

asulaiman
  • 1,221
  • 12
  • 18
  • 2
    possible duplicate of [jasmine test fails with undefined is not a function(evaluating $browser.$$checkUrlChange())](http://stackoverflow.com/questions/25785149/jasmine-test-fails-with-undefined-is-not-a-functionevaluating-browser-checku) – PSL Sep 26 '14 at 18:54
  • Looks like your angular mocks needs an update – PSL Sep 26 '14 at 18:55
  • Yes just stumbled across this, upgrade of angular mocks fixed the problem. thanks! – asulaiman Sep 26 '14 at 19:04
  • You could use voting system to give a thumbs up for that answer then..? :) – PSL Sep 26 '14 at 19:13
  • 1
    Done! That post was originally hard to find. – asulaiman Sep 26 '14 at 20:27

0 Answers0