Skip to content

Commit

Permalink
docs(ngMock/$timeout): deprecate flush() and verifyNoPendingTasks()
Browse files Browse the repository at this point in the history
  • Loading branch information
gkalpak committed Jul 13, 2018
1 parent 24eeab0 commit 6706353
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/ngMock/angular-mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -2278,6 +2278,13 @@ angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function($delegate, $
/**
* @ngdoc method
* @name $timeout#flush
*
* @deprecated
* sinceVersion="1.7.3"
*
* This method flushes all types of tasks (not only timeouts), which is unintuitive.
* It is recommended to use {@link ngMock.$flushPendingTasks} instead.
*
* @description
*
* Flushes the queue of pending tasks.
Expand All @@ -2303,6 +2310,14 @@ angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function($delegate, $
/**
* @ngdoc method
* @name $timeout#verifyNoPendingTasks
*
* @deprecated
* sinceVersion="1.7.3"
*
* This method takes all types of tasks (not only timeouts) into account, which is unintuitive.
* It is recommended to use {@link ngMock.$verifyNoPendingTasks} instead, which additionally
* allows checking for timeouts only (with `$verifyNoPendingTasks('$timeout')`).
*
* @description
*
* Verifies that there are no pending tasks that need to be flushed. It throws an error if there
Expand Down

0 comments on commit 6706353

Please sign in to comment.