Passing string to userEvent.paste()
uses invalid MIME type "text" instead of "text/plain"
#1269
Labels
userEvent.paste()
uses invalid MIME type "text" instead of "text/plain"
#1269
Reproduction example
https://codesandbox.io/p/sandbox/broken-rain-qdq5hs
Prerequisites
.paste()
with a stringtext
Expected behavior
Expected is that
e.clipboardData.types.includes('text/plain')
would return true, ande.clipboardData.getData('text/plain')
would give me back the string initially passed to.paste()
Actual behavior
e.clipboardData.getData('text/plain')
doesn't give anything back (and I don't want to be callinge.clipboardData.getData('text')
since I don't think that's an accurate/realistic mime type)User-event version
14.5.2
Environment
N/A (given I provided a working codesandbox above?)
Additional context
The
'text'
MIME type comes fromuser-event/src/clipboard/paste.ts
Line 32 in e4b826c
The text was updated successfully, but these errors were encountered: