@@ -187,7 +187,7 @@ angular.mock.$Browser = function($log, $$taskTrackerFactory) {
187
187
* Verifies that there are no pending tasks that need to be flushed.
188
188
* You can check for a specific type of tasks only, by specifying a `taskType`.
189
189
*
190
- * See {@link $verifyNoPendingsTasks } for more info.
190
+ * See {@link $verifyNoPendingTasks } for more info.
191
191
*
192
192
* @param {string= } taskType - The type tasks to check for.
193
193
*/
@@ -249,12 +249,12 @@ angular.mock.$Browser.prototype = {
249
249
* The types of tasks that are flushed include:
250
250
*
251
251
* - Pending timeouts (via {@link $timeout}).
252
- * - Pending tasks scheduled via {@link ng.$rootScope.Scope#$applyAsync}.
253
- * - Pending tasks scheduled via {@link ng.$rootScope.Scope#$evalAsync}.
252
+ * - Pending tasks scheduled via {@link ng.$rootScope.Scope#$applyAsync $applyAsync }.
253
+ * - Pending tasks scheduled via {@link ng.$rootScope.Scope#$evalAsync $evalAsync }.
254
254
* These include tasks scheduled via `$evalAsync()` indirectly (such as {@link $q} promises).
255
255
*
256
256
* <div class="alert alert-info">
257
- * Periodic tasks scheduled via {@link $interval} use a different queue and are flushed by
257
+ * Periodic tasks scheduled via {@link $interval} use a different queue and are not flushed by
258
258
* `$flushPendingTasks()`. Use {@link ngMock.$interval#flush $interval.flush([millis])} instead.
259
259
* </div>
260
260
*
@@ -276,21 +276,24 @@ angular.mock.$FlushPendingTasksProvider = function() {
276
276
* @name $verifyNoPendingTasks
277
277
*
278
278
* @description
279
- * Verifies that there are no pending tasks that need to be flushed.
279
+ * Verifies that there are no pending tasks that need to be flushed. It throws an error if there are
280
+ * still pending tasks.
281
+ *
280
282
* You can check for a specific type of tasks only, by specifying a `taskType`.
281
283
*
282
284
* Available task types:
283
285
*
284
286
* - `$timeout`: Pending timeouts (via {@link $timeout}).
285
287
* - `$http`: Pending HTTP requests (via {@link $http}).
286
288
* - `$route`: In-progress route transitions (via {@link $route}).
287
- * - `$applyAsync`: Pending tasks scheduled via {@link ng.$rootScope.Scope#$applyAsync}.
288
- * - `$evalAsync`: Pending tasks scheduled via {@link ng.$rootScope.Scope#$evalAsync}.
289
+ * - `$applyAsync`: Pending tasks scheduled via {@link ng.$rootScope.Scope#$applyAsync $applyAsync }.
290
+ * - `$evalAsync`: Pending tasks scheduled via {@link ng.$rootScope.Scope#$evalAsync $evalAsync }.
289
291
* These include tasks scheduled via `$evalAsync()` indirectly (such as {@link $q} promises).
290
292
*
291
293
* <div class="alert alert-info">
292
294
* Periodic tasks scheduled via {@link $interval} use a different queue and are not taken into
293
- * account by `$verifyNoPendingTasks()`.
295
+ * account by `$verifyNoPendingTasks()`. There is currently no way to verify that there are no
296
+ * pending {@link $interval} tasks.
294
297
* </div>
295
298
*
296
299
* @param {string= } taskType - The type of tasks to check for.
@@ -2278,12 +2281,14 @@ angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function($delegate, $
2278
2281
* @description
2279
2282
*
2280
2283
* Flushes the queue of pending tasks.
2284
+ *
2281
2285
* _This method is essentially an alias of {@link ngMock.$flushPendingTasks}._
2282
2286
*
2283
2287
* <div class="alert alert-warning">
2284
2288
* For historical reasons, this method will also flush non-`$timeout` pending tasks, such as
2285
- * {@link $q} promises and tasks scheduled via {@link ng.$rootScope.Scope#$applyAsync} and
2286
- * {@link ng.$rootScope.Scope#$evalAsync}.
2289
+ * {@link $q} promises and tasks scheduled via
2290
+ * {@link ng.$rootScope.Scope#$applyAsync $applyAsync} and
2291
+ * {@link ng.$rootScope.Scope#$evalAsync $evalAsync}.
2287
2292
* </div>
2288
2293
*
2289
2294
* @param {number= } delay maximum timeout amount to flush up until
@@ -2308,16 +2313,19 @@ angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function($delegate, $
2308
2313
*
2309
2314
* @description
2310
2315
*
2311
- * Verifies that there are no pending tasks that need to be flushed.
2316
+ * Verifies that there are no pending tasks that need to be flushed. It throws an error if there
2317
+ * are still pending tasks.
2318
+ *
2312
2319
* _This method is essentially an alias of {@link ngMock.$verifyNoPendingTasks} (called with no
2313
2320
* arguments)._
2314
2321
*
2315
2322
* <div class="alert alert-warning">
2316
2323
* <p>
2317
2324
* For historical reasons, this method will also verify non-`$timeout` pending tasks, such as
2318
2325
* pending {@link $http} requests, in-progress {@link $route} transitions, unresolved
2319
- * {@link $q} promises and tasks scheduled via {@link ng.$rootScope.Scope#$applyAsync} and
2320
- * {@link ng.$rootScope.Scope#$evalAsync}.
2326
+ * {@link $q} promises and tasks scheduled via
2327
+ * {@link ng.$rootScope.Scope#$applyAsync $applyAsync} and
2328
+ * {@link ng.$rootScope.Scope#$evalAsync $evalAsync}.
2321
2329
* </p>
2322
2330
* <p>
2323
2331
* It is recommended to use {@link ngMock.$verifyNoPendingTasks} instead, which additionally
0 commit comments