Skip to main content
Module

x/unitest/mod.ts>FakeTimer

🃏 Deno-first universal unit testing framework
Latest
class FakeTimer
implements FakeTimerSpec
import { FakeTimer } from "https://deno.land/x/unitest@v1.0.0-beta.82/mod.ts";

custom fake timer

Constructors

new
FakeTimer(clock: InstalledClock)

Methods

runAllTimers(): this

Exhausts both the macro-task queue and the micro-task queue.

useRealTimer(): void

Replaces the standard timer function. It must be called in any test using useFakeTimer.