I am attempting to create a test that checks a json response to contain either one property or another.
My example:
pm.expect(jsonData.data.owner).to.have.property('orgName') ||
pm.expect(jsonData.data.owner).to.have.property('firstName')
I can't seem to find any documentation on using or operators in the new pm.expect() syntax.
use oneOf() method
pm.expect(jsonData.carrierType.type).to.be.oneOf(["mobile", "landline"]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With