You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So then the rule should actually already handle this situation for us, we just need to implement support for index accessing - the logic should be something like:
if index access of style, attempt to determine the value being accessed from the matcher, and replace it with toHaveStyle({ <matcher>: expect.anything() });
The text was updated successfully, but these errors were encountered:
This was picked up in the smoke tests.
Currently
prefer-to-have-style
will error on indexed access ofstyle
, e.g.It wants you to replace the above with:
What I'm not sure is if that by itself is valid as the examples for that matcher only show complete CSS.Looking at our tests we have this case:
eslint-plugin-jest-dom/src/__tests__/lib/rules/prefer-to-have-style.js
Lines 100 to 104 in 9b48d90
So then the rule should actually already handle this situation for us, we just need to implement support for index accessing - the logic should be something like:
The text was updated successfully, but these errors were encountered: