karate - 错误 - karate.mapWithKey 不是函数
问题描述
如何处理以下空手道错误?
javascript 评估失败:karate.mapWithKey(list, 'name'), TypeError: karate.mapWithKey is not a function in at line number 1
def list = [ 'Bob', 'Wild', 'Nyan' ]
def data = karate.mapWithKey(list, 'name')
match data == [{ name: 'Bob' }, { name: 'Wild' }, { name: 'Nyan' }]
解决方案
您可能使用的是旧版本的空手道。升级。
如果您仍然卡住,请按照以下流程操作:https ://github.com/intuit/karate/wiki/How-to-Submit-an-Issue
推荐阅读
- git - 如何解决与受保护分支的合并冲突?
- c - 函数调用之外的指针取消引用不会编译,但内部可以
- string - tk.messagebox.showerror() 出现错误情况
- matlab - MATLAB:获取向量结构的最小 x 值
- visual-studio - .tfignore 路径没有被忽略
- pandas - 为大日期框架改进 Pandas PeriodIndex
- r - 在 R 中使用 ML 模型进行决策变量优化
- javascript - 反应 setState 钩子不更新循环外
- android - Android RecyclerView 不处理 SQLite 更改
- phpstorm - 如何设置 PhpStorm / WebStorm 以使用 Vite 别名?