-
Notifications
You must be signed in to change notification settings - Fork 249
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
fix: check element type in different environments #552
Conversation
Codecov Report
@@ Coverage Diff @@
## master #552 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 13 13
Lines 684 692 +8
Branches 214 216 +2
=========================================
+ Hits 684 692 +8
Continue to review full report at Codecov.
|
I think I'd prefer to merge the one in DOM, and then just bump the peerDep here, but either way this looks fine to me 👍 thanks! |
@kentcdodds testing-library/dom-testing-library#885 is closed so I guess we should merge this one. |
Sounds good to me 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
🎉 This PR is included in version 12.6.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Add a helper to verify the element type in different environments.
What:
Add a helper to utils.
This can be removed from this library and replaced by a shared helper in
@testing-library/dom
once it is bumped to a version that includes testing-library/dom-testing-library#885.Why:
See #550
How:
The helper tries to find the element constructor on the window.
As the window is neither required to be associated with the observed document nor is it required to provide any element constructors, the helper provides a fallback for other environments than Jest+JSDOM.
Checklist: