-
Notifications
You must be signed in to change notification settings - Fork 404
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
Add toHaveDescription() #244
Add toHaveDescription() #244
Conversation
Codecov Report
@@ Coverage Diff @@
## master #244 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 20 21 +1
Lines 268 281 +13
Branches 65 68 +3
=========================================
+ Hits 268 281 +13
Continue to review full report at Codecov.
|
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.
Wow, nice. Did not expect this, since there was no feature request before hand, but I can't see why not.
Very thorough implementations and tests. Covers everything that could be expected. Very well documented everything in the README as well.
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.
Didn't look at the implementation or tests, but I'm definitely a fan of having this! 👍
🎉 This PR is included in version 5.6.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
@all-contributors add @BurntCaramel for code, test, docs |
I've put up a pull request to add @BurntCaramel! 🎉 |
What:
Adds
toHaveDescription()
matcherWhy:
We are able to test labels and accessible names. Almost as popular are descriptions, specified by the
aria-describedby
attribute. It would be great to test these as they often complement labels.How:
toHaveDescription
matcher with testsChecklist:
I will need help on how to update the type definitions. But I am happy to do so! I know TypeScript well, I’m just not sure how to update the DefinitelyTyped mega repo — do you just pull down the whole thing and make a PR there?