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
Sinon fake timer's default is now easier to break Node either due to nextTick or queueMicrotask cf. #7288, sinonjs/fake-timers#507, so this is likely expected and out of scope for Vitest.
For our own Vitest's internal sinon fake timer usage for vi.useFakeTimers, we've explicitly removed nextTick and queueMicrotask by default to avoid such breakage.
I'm not sure we are able to send the error from child process to main one. I think I tried restoring nextTick back to original one, but some internals of Node were still hanging there. But sure we can try that here.
Earlier discussion from 2023 with minimal repro without Vitest, just node:child_process + @sinonjs/[email protected]:
Describe the bug
Calling
sinon.useFakeTimers()
in a test causes the test to hang:After a minute it exits with an error:
Reproduction
Minimum reproduction: https://github.com/JoshuaKGoldberg/repros/tree/vitest-hanging-with-sinon-useFakeTimers
The full use case is a package that wraps a Sinon API: JoshuaKGoldberg/sinon-timers-repeatable#894
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: