Back to Sinon

clock.jump(time)

docs/concepts/fake-timers/jump.md

22.1.0349 B
Original Source

clock.jump(time)

Advance the clock by jumping forward in time, firing callbacks at most once. time takes the same formats as clock.tick.

This can be used to simulate the JS engine (such as a browser) being put to sleep and resumed later, skipping intermediary timers.

<<< ../../.vitepress/tests/docs/fake-timers/api/jump.test.js