fix(ngMock.$interval): should use angular.isDefined

The newly introduced `$interval` mock service for ngMock calls `isDefined`
in the global namespace which fails when used within unit tests.

This change adds the missing `angular.` prefix to such `isDefined` calls.

Closes #4334
Closes #4353
This commit is contained in:
Mark J. Titorenko 2013-10-09 16:31:51 +01:00 committed by Pete Bacon Darwin
parent 1366556ace
commit 9bbd62f454

View file

@ -467,9 +467,9 @@ angular.mock.$IntervalProvider = function() {
var $interval = function(fn, delay, count, invokeApply) {
var deferred = $q.defer(),
promise = deferred.promise,
count = (isDefined(count)) ? count : 0,
count = (angular.isDefined(count)) ? count : 0,
iteration = 0,
skipApply = (isDefined(invokeApply) && !invokeApply);
skipApply = (angular.isDefined(invokeApply) && !invokeApply);
promise.then(null, null, fn);