-
-
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 throws when modernTimers are imported twice #11767
Comments
Doesn't fail here (tested on Linux, and Mac OS). With both running it as a script from the package.json via Yarn, and executing via node in the same fashion as what you are doing with your Could it perhaps be related to what some users mention in the issues you link to? |
@sigveio I don't think there're version mismatch issues, package.json contains only I've tried to reproduce the issue using the repo above and got the same error for |
…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
Jest uses
instanceof
check to ensuremodern
version of fakeTimers is being used. Which in addition with inconsistent file resolution system causes double import and the following error in test:Related Issues: #11660, #11662
To Reproduce
Steps to reproduce the behavior:
1.Clone example repo.
2.On windows open cmd and navigate to working directory using cd command.
cd c:\workingdir
Make sure the disk letter is lowercase on the cwd, not
C:\
3.Run jest cli
Expected behavior
Test shouldn't fail
Link to repl or repo (highly encouraged)
https://github.com/aliaksandr-yermalayeu/jest-faketimers-repro
envinfo
The text was updated successfully, but these errors were encountered: