angular/angular.js — pull request #10032 by terite (2014-11-13 01:21:50+00:00)
Title: fix(ngMock): call $interval callbacks even when invokeApply is false

Functions given to ngMock's $interval aren't being called after $interval.flush(...) when invokeApply is false. This is because $q.notify does work inside nextTick, and the nextTick provided to $q (which is $rootScope.$evalAsync), doesn't tick until a digest.

I mostly took changes from 19b6b3433ae9f8523cbc72ae97dbcf0c06960148

I'm really happy with the fix, but I don't know if it's actually a problem. It would be nice if ngMock's $interval was a decorator like $timeout, but I think that's too much of a change for my first PR.