You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fake timers do not mock AbortSignal.timeout or timers/promisesΒ #3088
I think we're waiting on sinon. In the mean time I've been mocking timers/promises with an implementation that delegates to global setTimeout so it's correctly mocked by useFakeTimers. I'm not sure how accurate my mock is so I won't bother sharing it here.
Activity
zbyte64 commentedon Aug 14, 2023
Related: sinonjs/fake-timers#418
LumaKernel commentedon Dec 4, 2023
Could mocking module
"timers/promises"and"node:timers/promises"builtin solve the problem? Or waiting sinonJS' decision?everett1992 commentedon Dec 4, 2023
I think we're waiting on sinon. In the mean time I've been mocking timers/promises with an implementation that delegates to global setTimeout so it's correctly mocked by
useFakeTimers. I'm not sure how accurate my mock is so I won't bother sharing it here.sheremet-va commentedon Feb 16, 2024
I am closing the issue here since Vitest cannot do anything to resolve this unless @sinonjs/fake-timers implement the correct API.