我在邮差脚本测试中有以下断言,但由于某种原因,当缺少以下其中一项时,测试失败:我的回复正文中有租约,财务或现金 . 是“||”不是OR运算符?
tests [“Deal Type”] = responseBody.has(“Lease”||“Finance”||“Cash”);
根据postman docs,正确的语法将是
tests["Deal Type"] = responseBody.has("Lease") || responseBody.has("Finance") || responseBody.has("Cash");
1 回答
根据postman docs,正确的语法将是