【发布时间】:2019-02-06 12:08:55
【问题描述】:
我的 JSON 如下:
{
"id" : 6759,
"type" : "JAVASCRIPT",
"code" : "var result = request.getBody().tostring.indexOf('locate') || request.getBody().tostring.indexOf('find')",
"description" : "This filters checks synonym of search word"
}
在上面的 JSON 中,code 属性是用特定的 javascript 映射的。
我要验证代码属性的值。
如果code属性的值没有任何编译错误,则code属性值的验证应该返回true。
如果code属性值使用编译错误,code属性值的验证应该返回false。
应该如何编译 javascript(即 code 属性的值)作为 Intuite/karate 测试中验证的一部分?
【问题讨论】:
标签: javascript cucumber karate