@@ -157,7 +157,7 @@ angular.mock.$Browser = function($log, $$taskTrackerFactory) {
157
157
* Verifies that there are no pending tasks that need to be flushed.
158
158
* You can check for a specific type of tasks only, by specifying a `taskType`.
159
159
*
160
- * See {@link $verifyNoPendingsTasks } for more info.
160
+ * See {@link $verifyNoPendingTasks } for more info.
161
161
*
162
162
* @param {string= } taskType - The type tasks to check for.
163
163
*/
@@ -226,12 +226,12 @@ angular.mock.$Browser.prototype = {
226
226
* The types of tasks that are flushed include:
227
227
*
228
228
* - Pending timeouts (via {@link $timeout}).
229
- * - Pending tasks scheduled via {@link ng.$rootScope.Scope#$applyAsync}.
230
- * - Pending tasks scheduled via {@link ng.$rootScope.Scope#$evalAsync}.
229
+ * - Pending tasks scheduled via {@link ng.$rootScope.Scope#$applyAsync $applyAsync }.
230
+ * - Pending tasks scheduled via {@link ng.$rootScope.Scope#$evalAsync $evalAsync }.
231
231
* These include tasks scheduled via `$evalAsync()` indirectly (such as {@link $q} promises).
232
232
*
233
233
* <div class="alert alert-info">
234
- * Periodic tasks scheduled via {@link $interval} use a different queue and are flushed by
234
+ * Periodic tasks scheduled via {@link $interval} use a different queue and are not flushed by
235
235
* `$flushPendingTasks()`. Use {@link ngMock.$interval#flush $interval.flush([millis])} instead.
236
236
* </div>
237
237
*
@@ -253,21 +253,24 @@ angular.mock.$FlushPendingTasksProvider = function() {
253
253
* @name $verifyNoPendingTasks
254
254
*
255
255
* @description
256
- * Verifies that there are no pending tasks that need to be flushed.
256
+ * Verifies that there are no pending tasks that need to be flushed. It throws an error if there are
257
+ * still pending tasks.
258
+ *
257
259
* You can check for a specific type of tasks only, by specifying a `taskType`.
258
260
*
259
261
* Available task types:
260
262
*
261
263
* - `$timeout`: Pending timeouts (via {@link $timeout}).
262
264
* - `$http`: Pending HTTP requests (via {@link $http}).
263
265
* - `$route`: In-progress route transitions (via {@link $route}).
264
- * - `$applyAsync`: Pending tasks scheduled via {@link ng.$rootScope.Scope#$applyAsync}.
265
- * - `$evalAsync`: Pending tasks scheduled via {@link ng.$rootScope.Scope#$evalAsync}.
266
+ * - `$applyAsync`: Pending tasks scheduled via {@link ng.$rootScope.Scope#$applyAsync $applyAsync }.
267
+ * - `$evalAsync`: Pending tasks scheduled via {@link ng.$rootScope.Scope#$evalAsync $evalAsync }.
266
268
* These include tasks scheduled via `$evalAsync()` indirectly (such as {@link $q} promises).
267
269
*
268
270
* <div class="alert alert-info">
269
271
* Periodic tasks scheduled via {@link $interval} use a different queue and are not taken into
270
- * account by `$verifyNoPendingTasks()`.
272
+ * account by `$verifyNoPendingTasks()`. There is currently no way to verify that there are no
273
+ * pending {@link $interval} tasks.
271
274
* </div>
272
275
*
273
276
* @param {string= } taskType - The type of tasks to check for.
@@ -2248,12 +2251,14 @@ angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function($delegate, $
2248
2251
* @description
2249
2252
*
2250
2253
* Flushes the queue of pending tasks.
2254
+ *
2251
2255
* _This method is essentially an alias of {@link ngMock.$flushPendingTasks}._
2252
2256
*
2253
2257
* <div class="alert alert-warning">
2254
2258
* For historical reasons, this method will also flush non-`$timeout` pending tasks, such as
2255
- * {@link $q} promises and tasks scheduled via {@link ng.$rootScope.Scope#$applyAsync} and
2256
- * {@link ng.$rootScope.Scope#$evalAsync}.
2259
+ * {@link $q} promises and tasks scheduled via
2260
+ * {@link ng.$rootScope.Scope#$applyAsync $applyAsync} and
2261
+ * {@link ng.$rootScope.Scope#$evalAsync $evalAsync}.
2257
2262
* </div>
2258
2263
*
2259
2264
* @param {number= } delay maximum timeout amount to flush up until
@@ -2270,16 +2275,19 @@ angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function($delegate, $
2270
2275
* @name $timeout#verifyNoPendingTasks
2271
2276
* @description
2272
2277
*
2273
- * Verifies that there are no pending tasks that need to be flushed.
2278
+ * Verifies that there are no pending tasks that need to be flushed. It throws an error if there
2279
+ * are still pending tasks.
2280
+ *
2274
2281
* _This method is essentially an alias of {@link ngMock.$verifyNoPendingTasks} (called with no
2275
2282
* arguments)._
2276
2283
*
2277
2284
* <div class="alert alert-warning">
2278
2285
* <p>
2279
2286
* For historical reasons, this method will also verify non-`$timeout` pending tasks, such as
2280
2287
* pending {@link $http} requests, in-progress {@link $route} transitions, unresolved
2281
- * {@link $q} promises and tasks scheduled via {@link ng.$rootScope.Scope#$applyAsync} and
2282
- * {@link ng.$rootScope.Scope#$evalAsync}.
2288
+ * {@link $q} promises and tasks scheduled via
2289
+ * {@link ng.$rootScope.Scope#$applyAsync $applyAsync} and
2290
+ * {@link ng.$rootScope.Scope#$evalAsync $evalAsync}.
2283
2291
* </p>
2284
2292
* <p>
2285
2293
* It is recommended to use {@link ngMock.$verifyNoPendingTasks} instead, which additionally
0 commit comments