Iâm getting a response that has 2 arrays in it. Example: { âhobbiesâ: [ âskatingâ, âpaintingâ ], âbooksâ: [ âbook1â, âbook2â ] }
How to check that response doesnât have array with the name âbooksâ?
Thank you.
Hi @artradz.v,
Here is the test code to check that the response body does not have the array name books.
let response = pm.response.json();
pm.test(âCheck that body had listâ, function(){ pm.expect(response).to.not.have.property(âbooksâ); });