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

Method runMicrotasks

testing/time.ts:617–619  ·  view source on GitHub ↗

* Runs all pending microtasks. * * @example Usage * ```ts * import { FakeTime } from "@std/testing/time"; * import { assert } from "@std/assert"; * * const fakeTime = new FakeTime(15_000); * * let called = false; * * Promise.resolve().then(() => { called = true });

()

Source from the content-addressed store, hash-verified

615 * ```
616 */
617 async runMicrotasks() {
618 await this.delay(0);
619 }
620
621 /**
622 * Adds the specified number of milliseconds to the fake time.

Callers 6

tickAsyncMethod · 0.95
nextAsyncMethod · 0.95
retry_test.tsFile · 0.80
pool_test.tsFile · 0.80
poll_test.tsFile · 0.80
time_test.tsFile · 0.80

Calls 1

delayMethod · 0.95

Tested by

no test coverage detected