将 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/