Ok. I\'ve tried to read other questions here but still didn\'t find a straightforward answer.
How can I assert a partial object match in an array using chai? Something
Clean, functional and without dependencies, simply use a map to filter the key you want to check
something like:
const data = [ { name: 'test', value: 'bananas' } ];
expect(data.map(e=>e.name)).to.include("test");
and if you want to test multiple keys:
expect(data.map(e=>({name:e.name}))).to.include({name:"test"});
https://www.chaijs.com/api/bdd/