-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
setSystemTime is not available when not using modern timers #11660
Comments
Oh hey, I was just here to report something similar. It's a bug in jest, the trigger is having mismatched versions of jest-* libraries. Downgrade jest and babel-jest to 27.0.3. I've created another issue with a little more detail on why this happens. #11662 |
@simon-paris yes you're right i was using a yarn workspace and the bug went away when all of my packages were on the same version of Jest |
…rnFakeTimers and LegacyFakeTimers methods Closes jestjs#11660 jestjs#11767 jestjs#11662
…rnFakeTimers and LegacyFakeTimers methods Closes jestjs#11660 jestjs#11767 jestjs#11662
…ernFakeTimers and LegacyFakeTimers methods Closes jestjs#11660 jestjs#11767 jestjs#11662
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
Since updating to jest v27 i get
setSystemTime is not available when not using modern timers
. I've always explicitly set timers to modern (which you can see below), but that doesn't seem to work.My config also includes:
It fails here:
https://github.com/facebook/jest/blob/59f42d86756fcc3c9caf0c8a5cf1b13324941d4e/packages/jest-runtime/src/index.ts#L1776-L1780
But when i break on that line (1776) it does look like
fakeTimers
are the modern variant.Also setSystemTime is not available when not using modern timers is a double negative, a better error message could be neccesary
To Reproduce
Steps to reproduce the behavior:
Expected behavior
For it to not moan
Link to repl or repo (highly encouraged)
envinfo
The text was updated successfully, but these errors were encountered: