4***@qq.com
4***@qq.com
  • 发布:2023-07-03 14:32
  • 更新:2023-07-03 14:32
  • 阅读:241

#插件讨论# 【 HBuilderX uni-app自动化测试 - DCloud-HBuilderX团队 】自动化测试reLaunch超时

分类:uni-app

pages下面其他路由页面使用reLaunch 就会报错超时,请问有什么解决办法吗

pages/investmentLink/homepage.vue › check page title
14:15:54.305 [jest:h5]
14:15:54.305 [jest:h5] thrown: "Exceeded timeout of 10000 ms for a hook.
14:15:54.306 [jest:h5] Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."
14:15:54.306 [jest:h5]
14:15:54.306 [jest:h5] 3
14:15:54.307 [jest:h5] describe('pages/investmentLink/homepage.vue', () => {
14:15:54.307 [jest:h5] 4
14:15:54.308 [jest:h5] let page;
14:15:54.308 [jest:h5] > 5
14:15:54.308 [jest:h5] beforeAll(async () => {
14:15:54.309 [jest:h5]
14:15:54.309 [jest:h5] ^
14:15:54.310 [jest:h5] 6
14:15:54.310 [jest:h5] // 重新reLaunch至首页,并获取首页page对象(其中 program 是uni-automator自动注入的全局对象)
14:15:54.310 [jest:h5] 7
14:15:54.310 [jest:h5] page = await program.reLaunch('/pages/investmentLink/homepage')
14:15:54.311 [jest:h5] 8
14:15:54.311 [jest:h5] await page.waitFor(5000)
14:15:54.312 [jest:h5]
14:15:54.312 [jest:h5] at jest_test/homepage.test.js:5:5
14:15:54.313 [jest:h5] at Object.<anonymous> (jest_test/homepage.test.js:3:1)

2023-07-03 14:32 负责人:无 分享
已邀请:

要回复问题请先登录注册