0

the response can be either true or false. I need to pass the test whether it's true or false in the response but it should check the condition if the value is true to pass the test as well as if false

script i am using is but not working pm.expect(jsonData.data[index].emailnotification).to.be.oneof([true,false])

the response of api is in array object e.g

"emailnotification": true

  • 2
    Can you add complete response from the service? and also the test error? if it is only one liner then can you try using pm.expect(jsonData.emailnotification).to.be.oneOf([true,false]); – Dhamo Jun 02 '20 at 13:15

0 Answers0