interface

test.FakeTimersOptions

interface FakeTimersOptions

  • advanceTimers?: number | boolean

    Jest's name for shouldAdvanceTime (pass true) and advanceTimeDelta (pass a number).

  • doNotFake?: FakeableAPI[]

    Don't fake these. This is Jest's name for the option.

  • loopLimit?: number

    The number of timers runAllTimers() runs before it throws. Any function that moves the clock also throws after this many faked process.nextTick or queueMicrotask callbacks in a row.

  • now?: number | Date

    The time Date reports when the fake clock starts.

  • shouldAdvanceTime?: boolean

    Advance the fake clock by advanceTimeDelta milliseconds every advanceTimeDelta real milliseconds.

  • timerLimit?: number

    Jest's name for loopLimit.

  • toFake?: FakeableAPI[]

    Fake only these.

  • toNotFake?: FakeableAPI[]

    Don't fake these. This is Vitest's name for the option.