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 have a case when the field can be present or not in the object. I would like to check the field if it's present in the object
Case 1: { a: 10, b: 'qwerty' }
Case 2: { a: 10, b: 'qwerty' , c: 10}
Hey Nick, I think this could be related to #51 in that expect-more-jest doesn't understand asymmetric matchers when it receives one as an argument. This needs to happen, but until that is released we will need to only provide regular values as arguments to matchers from this library unfortunately.
You're welcome Nick, thanks a lot. Receiving asymmetric matchers as arguments is a pretty big oversight I hadn't thought about, but it'll be do-able I'm pretty sure.
Description
I have a case when the field can be present or not in the object. I would like to check the field if it's present in the object
Case 1:
{ a: 10, b: 'qwerty' }
Case 2:
{ a: 10, b: 'qwerty' , c: 10}
(this won't work)
Returns error:
Maybe there is a way to check optional field?
Suggested Solution
Help Needed
The text was updated successfully, but these errors were encountered: