feat: Add check for container type on queries#604
Merged
kentcdodds merged 1 commit intoJun 5, 2020
Merged
Conversation
This is intended to give an informative warning when a base-query is called with a container that's neitheir an Element, Document or DocumentFragment. Ref: testing-library#537
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 19f1acd:
|
Codecov Report
@@ Coverage Diff @@
## master #604 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 24 24
Lines 537 550 +13
Branches 134 137 +3
=========================================
+ Hits 537 550 +13
Continue to review full report at Codecov.
|
Member
|
@all-contributors please add @Jnforja for code and tests |
Contributor
|
I've put up a pull request to add @Jnforja! 🎉 |
Member
|
🎉 This PR is included in version 7.10.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What:
Add check for container type on queries
Why:
So users of this library get an informative warning when
the first argument of a base-query is not an appropriate container.
How:
Checklist:
docs site N/A
DefinitelyTyped N/A
Some decisions I'd like to point out for review:
Please let me know if there's anything that I should change in this PR and I'll get to it :)
Ref: #537