MCPcopy Create free account
hub / github.com/denoland/std / tickAsync

Method tickAsync

testing/time.ts:685–688  ·  view source on GitHub ↗

* Runs all pending microtasks then adds the specified number of milliseconds to the fake time. * This will call any functions waiting to be called between the current and new fake time. * * @example Usage * ```ts * import { FakeTime } from "@std/testing/time"; * import { assert, as

(ms = 0)

Source from the content-addressed store, hash-verified

683 * @param ms The milliseconds to advance
684 */
685 async tickAsync(ms = 0) {
686 await this.runMicrotasks();
687 this.now += ms;
688 }
689
690 /**
691 * Advances time to when the next scheduled timer is due.

Callers 2

advanceUntilCompleteFunction · 0.80
time_test.tsFile · 0.80

Calls 1

runMicrotasksMethod · 0.95

Tested by

no test coverage detected