1234567891011 |
- import { install, type InstalledClock } from '@sinonjs/fake-timers'
- const useFakeTimers = (config: { now: Date }) => {
- const clock = install(config) as InstalledClock & { restore(): void }
- clock.restore = clock.uninstall
- return clock
- }
- Reflect.set(globalThis, 'sinon', { useFakeTimers })
|