Replies: 2 comments 1 reply
-
Perhaps I don't understand the docs. https://testing-library.com/docs/user-event/clipboard#copy states that |
Beta Was this translation helpful? Give feedback.
0 replies
-
@smbkr How did you solve the problem? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a component with
contenteditable
set, which accepts only plaintext content on paste via an event handler function. I'm not sure what the best way to test this with testing-library and user-event is.Implementation:
Test:
This test fails - the value of the input is always
''
.I've also tried creating a
DataTransfer
manually to pass touser.paste
but this doesn't work asDataTransfer
is not defined in the jsdom environment.Beta Was this translation helpful? Give feedback.
All reactions