Skip to content

@testing-library/user-event 14.x doesn't work with @testing-library/react 12.5.1 and React <18 #1123

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

Closed
alveshelio opened this issue May 1, 2023 · 1 comment
Labels
bug Something isn't working needs assessment This needs to be looked at by a team member

Comments

@alveshelio
Copy link

alveshelio commented May 1, 2023

Reproduction example

https://codesandbox.io/p/sandbox/determined-tesla-82p2up?file=%2Fsrc%2Fcomponents%2FItemList.test.tsx

Prerequisites

  1. npm run test

Expected behavior

await user.click(screen.getByRole('button')) should click the button.

Actual behavior

await user.click(screen.getByRole('button')) throws a thrown: "Exceeded timeout of 5000 ms for a test.

User-event version

14.4.3

Environment

"jest": "^29.5.0",
"ts-jest": "^29.1.0",

Additional context

No response

@alveshelio alveshelio added bug Something isn't working needs assessment This needs to be looked at by a team member labels May 1, 2023
@alveshelio alveshelio changed the title @testing-library/user-event 14.4.3 doesn't work with @testing-library/react 12.5.1 @testing-library/user-event 14.x doesn't work with @testing-library/react 12.5.1 May 2, 2023
@alveshelio alveshelio changed the title @testing-library/user-event 14.x doesn't work with @testing-library/react 12.5.1 @testing-library/user-event 14.x doesn't work with @testing-library/react 12.5.1 and React <18 May 2, 2023
@alveshelio
Copy link
Author

This is not an issue with @testing-library/user-event not working with @testing-library/react, it's an issue with fakeTimers testing-library/react-testing-library#1197

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs assessment This needs to be looked at by a team member
Projects
None yet
Development

No branches or pull requests

1 participant