KC's Workspace
    Preparing search index...
    interface FakeTimerInstallOpts {
        advanceTimeDelta?: number;
        ignoreMissingTimers?: boolean;
        loopLimit?: number;
        now?: number | Date;
        shouldAdvanceTime?: boolean;
        shouldClearNativeTimers?: boolean;
        toFake?: FakeMethod[];
    }
    Index

    Properties

    advanceTimeDelta?: number

    Relevant only when using with shouldAdvanceTime: true. increment mocked time by advanceTimeDelta ms every advanceTimeDelta ms change in the real system time (default: 20)

    ignoreMissingTimers?: boolean

    Tells FakeTimers to not throw an error when faking a timer that does not exist in the global object. (default: false)

    loopLimit?: number

    The maximum number of timers that will be run when calling runAll() (default: 1000)

    now?: number | Date

    Installs fake timers with the specified unix epoch (default: 0)

    shouldAdvanceTime?: boolean

    Tells @sinonjs/fake-timers to increment mocked time automatically based on the real system time shift (e.g. the mocked time will be incremented by 20ms for every 20ms change in the real system time) (default: false)

    shouldClearNativeTimers?: boolean

    Tells FakeTimers to clear 'native' (i.e. not fake) timers by delegating to their respective handlers. These are not cleared by default, leading to potentially unexpected behavior if timers existed prior to installing FakeTimers. (default: false)

    toFake?: FakeMethod[]

    An array with names of global methods and APIs to fake. By default, @sinonjs/fake-timers does not replace nextTick() and queueMicrotask(). For instance, FakeTimers.install({ toFake: ['setTimeout', 'nextTick'] }) will fake only setTimeout() and nextTick()