-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
Copy to clipboard fails #1153
Comments
Is there no fix for this yet? |
I'm not using any hook libs but just a regular |
I too am having this issue. I am pretty sure it is related to this work: #1116 as when I install 12.7.0 my tests pass fine, and when I install 12.8.0 they fail with this same message ("Type text/plain does not match the blob's type"). |
… Promise as data type, causing React tests to fail, as testing-library overrides the Clipboard implementation with an implementation relying on Promise as data type
fix: [#1153] Fixes problem with ClipboardItem not supporting text and…
Thank you for reporting @robinelvin, @dhruvkelawala , @dteoh and @andrewdodd! 🙂 The problem should be fixed now: |
Describe the bug
Using the
useCopyToClipboard
hook fromusehooks-ts
in a component makes it fail in testing with happy-dom with the following message:To Reproduce
Steps to reproduce the behavior:
usehooks-ts
useCopyToClipboard
hook to copy some plain text to the clipboard on a button press for example.happy-dom
and click the button in the test codeExpected behavior
The string should be copied to the clipboard without error.
Screenshots
If applicable, add screenshots to help explain your problem.
Device:
The text was updated successfully, but these errors were encountered: