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

Method nextAsync

testing/time.ts:745–748  ·  view source on GitHub ↗

* Runs all pending microtasks then advances time to when the next scheduled timer is due. * If there are no pending timers, time will not be changed. * * @example Usage * ```ts * import { FakeTime } from "@std/testing/time"; * import { assert, assertEquals } from "@std/assert";

()

Source from the content-addressed store, hash-verified

743 * @returns `true` if the pending timers existed and the time advanced, `false` if there was no pending timer and the time didn't advance.
744 */
745 async nextAsync(): Promise<boolean> {
746 await this.runMicrotasks();
747 return this.next();
748 }
749
750 /**
751 * Advances time forward to the next due timer until there are no pending timers remaining.

Callers 4

runAllAsyncMethod · 0.95
retry_test.tsFile · 0.80
poll_test.tsFile · 0.80
time_test.tsFile · 0.80

Calls 2

runMicrotasksMethod · 0.95
nextMethod · 0.95

Tested by

no test coverage detected