Back to Sinon

clock.next()

docs/concepts/fake-timers/next.md

22.1.0317 B
Original Source

clock.next() / await clock.nextAsync()

Advances the clock to the the moment of the first scheduled timer, firing it.

The nextAsync() will also break the event loop, allowing any scheduled promise callbacks to execute before running the timers.

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