Match partial objects in Chai assertions?
chai-subset or chai-fuzzy might also perform what you’re looking for. Chai-subset should work like this: expect([ { C1: ‘xxx’, C0: ‘this causes it not to match.’ } ]).to.containSubset([{C1: ‘xxx’}]); Personally if I don’t want to include another plugin I will use the property or keys matchers that chai includes: ([ { C1: ‘xxx’, C0: ‘this … Read more