-
Notifications
You must be signed in to change notification settings - Fork 406
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
toHaveStyle failing for upper cased style rules in version 4.1.2 #148
Comments
@ppiyush13 could you please try to put a codesandbox to reproduce this issue, im having some similar issue and i just wanted to confirm this |
@ruhaise |
@ppiyush13 can you let me know if #154 fixes your issue? |
@connormeredith I looked at the pull request https://github.com/testing-library/jest-dom/pull/154/files . I think it should fix this issue |
I'll be approving the PR because I confirmed css selectors are not case sensitive (to my surprise). I just wonder why are you specifying them in your tests with capitalized names? 🤔 |
🎉 This issue has been resolved in version 4.2.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
@gnapse no specific reason for specifying CSS rules in upper case. I could have went ahead by making it lower case. I opened this issue because it was working fine till version 4.1.1 |
@testing-library/jest-dom library version:
4.1.2
Consider the following div element:
I am using toHaveStyle to match CSS style rules as shown below
Expected:
It should not throw error and proceed ahead
Actual:
It fails.
But below works fine
Seems that toHaveStyle needs CSS rules to be in lower case.
But this was working as expected in version
4.1.1
The text was updated successfully, but these errors were encountered: