In the test, I am trying to compare the value of email from identities to unverified
and print if they are same or different, but it is always coming true, eventhough the values are different. Can anyone help me what am I doing wrong
pm.test("Body is correct", function () {
var jsonData = pm.response.json();
var counter = jsonData.results[0];
console.log(counter.identities[0].email);
console.log(counter.emails.unverified[0]);
if((counter.identities[0].email).to.deep.equal(counter.emails.unverified[0])){
console.log("value Matched");
}
});
Depends what you ultimately want to do with the information.
You can get all those data points, do your if/else statements etc. all outside of a test but you’re also not limited to having just a single expect statement in a test.