-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling fastGlob()
with a mocked system time runs forever
#362
Comments
Hello, @Haegi, It's an interesting situation. I'll take a look at it. Right now I can assume that the current behavior is related to the use of the If that's the case, I can't help here, because I can't refuse to use this function. |
I think we can remove the problematic method inside the Will be fixed in the next major version of the Now can use the selective faking functionality to work around this problem. |
Thanks @mrmlnc for your investigations. |
If we don't remember to call useRealTimers after useFakeTimers vitest will keep these date and time functions mocked, which can cause issues to other libraries which depend on the passing of time. In our case, fastglob would hang indefinitely: mrmlnc/fast-glob#362
Fixed in nodelib/nodelib@f588299. Will be shipped with v4 (#371). |
Environment
package.json
Actual behavior
fastGlob()
runs forever with a (jest) mocked system time.Expected behavior
I would expect that
fast-glob
doesn't care about the system time.Steps to reproduce
fastGlob()
Code sample
The text was updated successfully, but these errors were encountered: