MockTimers
type MockTimers = MockTimers| Assembly | Xantham.Fable.Node |
Mocking timers is a technique commonly used in software testing to simulate and control the behavior of timers, such as setInterval and setTimeout, without actually waiting for the specified time intervals.
The MockTimers API also allows for mocking of the Date constructor and setImmediate/clearImmediate functions.
The MockTracker provides a top-level timers export which is a MockTimers instance.
@since v20.4.0