-
Notifications
You must be signed in to change notification settings - Fork 401
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 toBeReadonly matcher #241
Add toBeReadonly matcher #241
Conversation
Codecov Report
@@ Coverage Diff @@
## master #241 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 20 21 +1
Lines 268 279 +11
Branches 65 68 +3
=========================================
+ Hits 268 279 +11
Continue to review full report at Codecov.
|
There's one thing here I am not fully convinced of, and I would have rather had you opening an issue before hand to discuss, but here it is: We previously considered adding I am worried that this poses a similar issue: that If so, then I think we are in the same situation as in #144 with the Other than that I had already reviewed your PR and looked good, but I wanted to take this comment out up front because if I'm right, it kinda changes a lot. |
Actually, I totally forgot, but we already had an attempt to contribute a |
Thank you for your response, and sorry for getting carried away and opening the PR before filling an issue 😅 After reading #144 and #204 I think you're right, if we don't check for At least it was a good exercise to get to know how the project works 😂 Thank you for your time! |
Thank you for your time. And yes, that's why it's almost always a good idea to propose new features before implementing them. |
What: This PR adds a
toBeReadonly
matcher.Why: Today I was testing some inputs on a project I'm working on and I thought this would be useful instead of having to use
toHaveAttribute
.How: I checked how the other matches worked, I've searched on MDN what inputs support readonly and which aria roles accept aria-readonly (although I'm not sure I did it right).
Checklist:
I'm not sure if it should be
toBeReadOnly
ortoBeReadonly
. Also I'd love some help with the aria-roles, I'm not sure if I did it right to be honest.There is a check about type definitions, where can I find them?