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
I want to assert that the checked status is "mixed". It generally is only "true" or "false", but it can also be "mixed".
What happened:
The rule to prefer toBeChecked kicked in, but I cannot assert what I want with that custom matcher.
Suggested solution:
I think we need to either make an exception here with "mixed", but that would also be a problem, because for legibility in my test I'd like to use the same kind of assertion as my checkbox state changes. So it would not be ideal to use toBeChecked for some cases but not others with only a couple of lines of difference.
Or maybe there's nothing to do here. The "mixed" case is so rare, that maybe what we need to do is to disable the rule for that line. But I still wanted to discuss.
The text was updated successfully, but these errors were encountered:
eslint-plugin-jest-dom
version: 2.1.0Relevant code or config
What you did:
I want to assert that the checked status is "mixed". It generally is only "true" or "false", but it can also be "mixed".
What happened:
The rule to prefer
toBeChecked
kicked in, but I cannot assert what I want with that custom matcher.Suggested solution:
I think we need to either make an exception here with
"mixed"
, but that would also be a problem, because for legibility in my test I'd like to use the same kind of assertion as my checkbox state changes. So it would not be ideal to usetoBeChecked
for some cases but not others with only a couple of lines of difference.Or maybe there's nothing to do here. The "mixed" case is so rare, that maybe what we need to do is to disable the rule for that line. But I still wanted to discuss.
The text was updated successfully, but these errors were encountered: