-
Notifications
You must be signed in to change notification settings - Fork 251
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
.click() not working when injectGlobals: false and fake timers enabled #1173
Comments
Can anyone confirm or deny? |
Can reproduce |
I'm also seeing this happening with Vitest's |
Update: I'm not doing |
Reproduction example
https://github.com/krutoo/testing-library-user-event-with-fake-timers
Prerequisites
Expected behavior
Tests should be done
Actual behavior
Test fails by timeout 5000ms
User-event version
14.5.1
Environment
Testing Library framework:
@testing-library/react@12.1.3
JS framework:
react@18.2.0
Test environment:
jest@29.7.0
DOM implementation:
jest-environment-jsdom@29.7.0
Additional context
In jest config I use
injectGlobals: false
and may be its the reasonI also use
userEvent.setup({ advanceTimers: jest.advanceTimersByTime })
and its not solves issue.The text was updated successfully, but these errors were encountered: