Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix(mocks.$timeout): forward delay argument
Browse files Browse the repository at this point in the history
The $timeout decorator was not forwarding the delay argument to `browser.defer.flush(delay)`.
  • Loading branch information
vojtajina committed Aug 14, 2013
1 parent da72071 commit a5fb372
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ngMock/angular-mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down

0 comments on commit a5fb372

Please sign in to comment.