Reputation: 2019
"thing": [
{
"id": 1,
}
]
How do I assert that thing is an array with an object that contains ID
I tried
expect(response.thing).to.deep.include('id');
But that doesn't work
Upvotes: 0
Views: 113
Reputation: 5917
If you want to check:
id
pm.expect(JSON.stringify(response.thing)).to.deep.include('id');
id
pm.expect(response.thing[0]).to.have.keys('id');
Upvotes: 1