W3cubDocs

/Angular.js 1.6

Improve this Doc View Source $timeout

  1. service in module ngMock

Overview

This service is just a simple decorator for $timeout service that adds a "flush" and "verifyNoPendingTasks" methods.

Methods

  • flush([delay]);

    Flushes the queue of pending tasks.

    Parameters

    Param Type Details
    delay
    (optional)
    number

    maximum timeout amount to flush up until

  • verifyNoPendingTasks();

    Verifies that there are no pending tasks that need to be flushed.

© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.6.8/docs/api/ngMock/service/$timeout