Cypress测试在我的应用程序-支持/索引出现未捕获异常时失败。js不工作

凉秀策 测试交流评论208字数 641阅读模式
摘要此错误源于我的应用程序 Uncaught(in promise)TypeError:无法读取未定义的属性(读取“links”) 但在我的支持/索引中。我写的js //导入命令。js...

此错误源于我的应用程序

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'links')

但在我的支持/索引中。我写的js文章源自玩技e族-https://www.playezu.com/182828.html

// Import commands.js using ES2015 syntax:
import './commands'
Cypress.on('uncaught:exception', (err, runnable, promise) => {
// when the exception originated from an unhandled promise
// rejection, the promise is provided as a third argument
// you can turn off failing the test in this case
if (err.message.includes("Unexpected token ':'")) {
return false
}
if (err.message.includes("TypeError")) {
return false
}
if (err.message.includes("Uncaught")) {
return false
}
// we still want to ensure there are no other unexpected
// errors, so we let them fail the test
})

为什么我不能用 如果出错。消息包括(“TypeError”)文章源自玩技e族-https://www.playezu.com/182828.html

Cypress 9.1版文章源自玩技e族-https://www.playezu.com/182828.html

软件测试功能测试项目经历文章源自玩技e族-https://www.playezu.com/182828.html 文章源自玩技e族-https://www.playezu.com/182828.html

玩技站长微信
添加好友自动发送入群邀请
weinxin
rainbow-shownow
玩技官方公众号
官方微信公众号
weinxin
PLAYEZU
 
  • 版权提示:本站仅供存储任何法律责任由作者承担▷诈骗举报◁▷新闻不符◁▷我要投稿◁
    风险通知:非原创文章均为网络投稿真实性无法判断,侵权联系2523030730
    免责声明:内容来自用户上传发布或新闻客户端自媒体,切勿!切勿!切勿!添加联系方式以免受骗。
  • 原创转载:https://www.playezu.com/182828.html
    转载说明: 点我前往阅读>>>
匿名

发表评论

匿名网友
确定