node.js - 如何解决 @0.21.0 上 tetscafe 上的问题(testcafe-live 不起作用)

标签 node.js testing npm automated-tests testcafe

将 testcafe 版本从 0.21 升级到 0.23 后,我们遇到了 testcafe-live 无法运行的问题。

命令。

testcafe-live chrome tests/menu/test0001.ts --screenshots my-fixture/chrome --trace-warnings

控制台消息

(node:9808) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'map' of undefined
at new TestRunner (D:\business\comp\Git\autotest\node_modules\testcafe-live\lib\test-runner.js:36:46)
at Controller.init (D:\business\comp\Git\autotest\node_modules\testcafe-live\lib\controller.js:26:27)
at tcArguments.parse.then (D:\business\comp\Git\autotest\node_modules\testcafe-live\lib\index.js:16:28)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
(node:9808) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9808) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

我们尝试过(但不起作用)

·删除node_modules并清理缓存

del node_modules
npm clean cache

・根据这个问题,修改了程序 https://github.com/DevExpress/testcafe-live/issues/25 https://github.com/DevExpress/testcafe-live/pull/30 (我不确定这个问题与我的问题有关)

程序版本

"dependencies": {
    "@types/node": "^10.9.4",
    "testcafe": "^1.0.0",
    "testcafe-browser-provider-puppeteer": "^1.4.0",
    "testcafe-live": "^0.1.4"
  },

我尝试了 testcafe @0.23.0、1.1.3、1.1.4,但不起作用

Node @v8.11.3

npm @5.6.0

操作系统windows10 pro

你能帮我吗?

最佳答案

单独的 testcafe-live CLI 实用程序现已被放弃。其所有功能都集成到 testcafe 实用程序中:Live mode 。使用 testcafe --live ... 而不是 testcafe-live ...

关于node.js - 如何解决 @0.21.0 上 tetscafe 上的问题(testcafe-live 不起作用),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56036272/

相关文章:

javascript - express.js 异步路由器和错误处理

javascript - 无法缩小 bundle 。来自 Terser 的错误 : static/js/main. 68c81611.chunk.js

node.js - 当 .ejs 文件更改时,是否有类似 nodemon 的东西会重新启动 Node 应用程序?

visual-studio-2010 - 单元测试在 session 窗口中的 "Build failed"上失败,没有消息提供 Visual Studios 2010 中的失败原因

Spring webflux,测试 `ServerResponse`

angularjs - 影响数据库的 Angular e2e 测试

npm - 强制grunt插件更新

node.js - 使用 socket.io 流式传输网络摄像头

node.js - npm glob 错误和未满足的依赖项

python - 无法对项目进行 "npm install"