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

    Don't throw error when asked to fake timers that are not present.

    false
    
    loopLimit?: number

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

    10000
    
    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.

    true
    
    toFake?: FakeMethod[]

    An array with names of global methods and APIs to fake. For instance, vi.useFakeTimer({ toFake: ['setTimeout', 'performance'] }) will fake only setTimeout() and performance.now()

    everything available globally except nextTick