-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
InputMask: cannot test component with @testing-library/user-event >= 14.0.0 #5747
Comments
PR is welcome if you want to debug it. |
I did some debugging and found the following:
Is there any way to get around using offsetParent? |
I don't like changing working code to fix JSDOM or Jest issues.... |
I understand that.
There should probably be some codepath here that does not result in an exception. If you do not want to change the code, is it possible to add something to the documentation then? |
Well if you create stackblitz reproducer showing the bug we can fix. I wasn't going to fix if it's just a JSDOM issue. |
@Vloeck PR submitted I found anyplace |
@Vloeck 10.3.2 is out can you try again and let me know? |
I tested it and my tests work now. |
Thanks for the help! |
Describe the bug
When using @testing-library/user-event >= 14.0.0 with type(), the InputMask throws:
TypeError: Cannot read properties of undefined (reading 'end')
because
caret()
apparently returnsundefined
Full StackTrace:
Reproducer
https://codesandbox.io/p/devbox/zj64yy
PrimeReact version
10.3.1
React version
18.x
Language
ALL
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
or
npm install
andnpm run test
Expected behavior
test does not fail with Exception
was working well with @testing-library/user-event 13.5.0
The text was updated successfully, but these errors were encountered: