Karate 如何把;或;空手道API断言语句中的运算符

Karate 如何把;或;空手道API断言语句中的运算符,karate,Karate,我想在空手道API中为断言语句使用“或”运算符 这是我第一次尝试在空手道API中使用或操作: match response.items[0].type == 'Purchase' 我想使用OR运算符,如: match response.items[0].type == 'Purchase' or 'Freeplay' 我无法使用或语句成功执行有时是最简单的选项: * def itemType = response.items[0].type * assert (itemType ==

我想在空手道API中为断言语句使用“或”运算符

这是我第一次尝试在空手道API中使用或操作:

 match response.items[0].type == 'Purchase' 
我想使用OR运算符,如:

 match response.items[0].type == 'Purchase' or 'Freeplay'
我无法使用或语句成功执行

有时是最简单的选项:

* def itemType = response.items[0].type
* assert (itemType == 'Purchase') || (itemType == 'Freeplay')

还有其他方法,请参见:

请参见:如何创建一个最小的、可复制的示例-这对我来说非常有效,谢谢@