公司的前端自动化项目使用的jest框架,已经通过yarn add --dev jest安装了jest,
执行自动化脚本
package.json中如下
"scripts": {
"start_one":"jest --runInBand --forceExit --update=true --downloaXXXXX后面的省略掉"
}
进入自动化项目命令行 yarn start_one,报错如下:
jest-jasmine is no longer shipped by default with Jest, you need to install it explicitly or provide an absolute path to Jest
Configuration Documentation:
使用全局安装jest, yarn global add jest,再次执行,问题还在
求助求助,
另外怎么把jest添加系统变量PATH中,真不会阿(安装jest后的路径D:programsnode_modules@jest)
20230915:
TimeoutError: Navigation timeout of 30000 ms exceeded
at LifecycleWatcher._LifecycleWatcher_createTimeoutPromise (node_modules/puppeteer-core/src/common/LifecycleWatcher.ts:258:12)
解决方案:
const browser = await puppeteer.launch({ timeout: 60000, // 设置超时时间为 60 秒 });
或者
const browser = await puppeteer.launch(); const page = wPage(); const auditUrl = ''; (auditUrl, { timeout: 60000 });
本文发布于:2024-02-05 03:40:18,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170723203562745.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |