From a5fb372e1e6aed8cdb1f572f1df3d6fe89388f3e Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Wed, 14 Aug 2013 15:55:27 -0700 Subject: [PATCH] fix(mocks.$timeout): forward delay argument The $timeout decorator was not forwarding the delay argument to `browser.defer.flush(delay)`. --- src/ngMock/angular-mocks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index 3f58b399f250..5d8b1b336830 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -1446,8 +1446,8 @@ angular.module('ngMock', ['ng']).provider({ $rootElement: angular.mock.$RootElementProvider }).config(function($provide) { $provide.decorator('$timeout', function($delegate, $browser) { - $delegate.flush = function() { - $browser.defer.flush(); + $delegate.flush = function(delay) { + $browser.defer.flush(delay); }; return $delegate; });