summaryrefslogtreecommitdiffstats
path: root/js/vendor/angular-mocks/angular-mocks.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/vendor/angular-mocks/angular-mocks.js')
-rw-r--r--js/vendor/angular-mocks/angular-mocks.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/js/vendor/angular-mocks/angular-mocks.js b/js/vendor/angular-mocks/angular-mocks.js
index 12edf51cf..f4eadcdec 100644
--- a/js/vendor/angular-mocks/angular-mocks.js
+++ b/js/vendor/angular-mocks/angular-mocks.js
@@ -1,5 +1,5 @@
/**
- * @license AngularJS v1.4.0-build.3887+sha.41fdb3d
+ * @license AngularJS v1.4.0-build.3911+sha.e57138d
* (c) 2010-2015 Google, Inc. http://angularjs.org
* License: MIT
*/
@@ -432,6 +432,7 @@ angular.mock.$LogProvider = function() {
* indefinitely.
* @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
* will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
+ * @param {...*=} Pass additional parameters to the executed function.
* @returns {promise} A promise which will be notified on each iteration.
*/
angular.mock.$IntervalProvider = function() {
@@ -442,13 +443,17 @@ angular.mock.$IntervalProvider = function() {
now = 0;
var $interval = function(fn, delay, count, invokeApply) {
- var iteration = 0,
+ var hasParams = arguments.length > 4,
+ args = hasParams ? Array.prototype.slice.call(arguments, 4) : [],
+ iteration = 0,
skipApply = (angular.isDefined(invokeApply) && !invokeApply),
deferred = (skipApply ? $$q : $q).defer(),
promise = deferred.promise;
count = (angular.isDefined(count)) ? count : 0;
- promise.then(null, null, fn);
+ promise.then(null, null, (!hasParams) ? fn : function() {
+ fn.apply(null, args);
+ });
promise.$$intervalId = nextRepeatId;