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
waitFor is not working with jest fakeTimers #1208
Comments
I guess it's the same as #1187 . Jest since v27 uses new implementation of fake timers, and as described in #1187, testing library doesn't work with them as of the moment. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@testing-library/react
version: v14.0.0jest
version 29.5.0jsdom
version 29.5.0Relevant code or config:
Here is the test code (designed to fail):
What you did:
Running tests with
npm run test
.What happened:
The test failed nearly instantly.
However, if I comment the
jest.useFakeTimers()
line, it works as expected.Reproduction:
I made a basic repro here.
Problem description:
Using jest fake timers breaks the
waitFor
function.The text was updated successfully, but these errors were encountered: