Closed alveshelio closed 1 year ago
https://codesandbox.io/p/sandbox/determined-tesla-82p2up?file=%2Fsrc%2Fcomponents%2FItemList.test.tsx
npm run test
await user.click(screen.getByRole('button')) should click the button.
await user.click(screen.getByRole('button'))
await user.click(screen.getByRole('button')) throws a thrown: "Exceeded timeout of 5000 ms for a test.
14.4.3
"jest": "^29.5.0", "ts-jest": "^29.1.0",
No response
This is not an issue with @testing-library/user-event not working with @testing-library/react, it's an issue with fakeTimers https://github.com/testing-library/react-testing-library/issues/1197
fakeTimers
Reproduction example
https://codesandbox.io/p/sandbox/determined-tesla-82p2up?file=%2Fsrc%2Fcomponents%2FItemList.test.tsx
Prerequisites
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