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

Commit 637f13b

Browse files
committed
docs(ngMock/$timeout): deprecate flush() and verifyNoPendingTasks()
1 parent be7dd96 commit 637f13b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/ngMock/angular-mocks.js

+15
Original file line numberDiff line numberDiff line change
@@ -2268,6 +2268,13 @@ angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function($delegate, $
22682268
/**
22692269
* @ngdoc method
22702270
* @name $timeout#flush
2271+
*
2272+
* @deprecated
2273+
* sinceVersion="1.7.3"
2274+
*
2275+
* This method flushes all types of tasks (not only timeouts), which is unintuitive.
2276+
* It is recommended to use {@link $flushPendingTasks} instead.
2277+
*
22712278
* @description
22722279
*
22732280
* Flushes the queue of pending tasks.
@@ -2291,6 +2298,14 @@ angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function($delegate, $
22912298
/**
22922299
* @ngdoc method
22932300
* @name $timeout#verifyNoPendingTasks
2301+
*
2302+
* @deprecated
2303+
* sinceVersion="1.7.3"
2304+
*
2305+
* This method takes all types of tasks (not only timeouts) into account, which is unintuitive.
2306+
* It is recommended to use {@link $verifyNoPendingTasks} instead, which additionally allows
2307+
* checking for timeouts only (with `$verifyNoPendingTasks('$timeout')`).
2308+
*
22942309
* @description
22952310
*
22962311
* Verifies that there are no pending tasks that need to be flushed.

0 commit comments

Comments
 (0)