Chai's `to.deep.have.members` is converted to `toEqual` which is wrong
I have found correct method for that in jest-extended - toIncludeAllMembers.
Thanks for reporting this. Are you up for creating a PR for this? We don't want to depend on jest-extended though.
Not sure I see alternative to toIncludeAllMembers
So I just checked and we convert:
- expect([{ id: 1 }]).to.deep.include.members([{ id: 1 }]);
+ expect([{ id: 1 }]).toEqual(expect.arrayContaining([{ id: 1 }]));
That seems to be correct. Can you report which case this didn't work for you @deser
As far as I remember it was just toEqual without expect.arrayContaining. However I'm not sure that to.deep.include.members is covered by toEqual(expect.arrayContaining, you can check what's inside toIncludeAllMembers I just don't have time to cover all cases