Jest · Method
jest.runAllTimers
jest.runAllTimers() runs all pending timer and microtask work. It also runs newly scheduled work until no tasks remain.
Last updated
Syntax
jest.runAllTimers()In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
jest.useFakeTimers()jest.useRealTimers()jest.runAllTimersAsync()jest.runOnlyPendingTimers()jest.advanceTimersByTime()