0

我正在研究基于 Wdio-Chai-Cucumber 的 e2e-testsuite,它运行良好,直到我不得不更新 chromedriver。

这是我的堆栈:

  "devDependencies": {
    "@types/chai": "^4.2.13",
    "@types/cucumber": "^6.0.1",
    "@types/node": "^14.11.8",
    "@types/webdriverio": "^5.0.0",
    "@wdio/cli": "6.6.2",
    "@wdio/cucumber-framework": "^6.10.6",
    "@wdio/local-runner": "6.6.2",
    "@wdio/spec-reporter": "6.8.1",
    "@wdio/sync": "6.10.4",
    "chai": "^4.2.0",
    "chromedriver": "90.0.1",
    "cucumber": "^7.0.0-rc.0",
    "cucumber-html-reporter": "5.2.0",
    "del-cli": "^3.0.1",
    "eslint": "^7.10.0",
    "wdio-chromedriver-service": "^7.1.0",
    "wdio-cucumber-parallel-execution": "^3.6.14",
    "wdio-cucumberjs-json-reporter": "2.0.2",
    "wdio-docker-service": "^3.1.2"
  },
  "dependencies": {
    "ts-node": "^9.0.0",
    "typescript": "^4.0.3"
  },

将项目 chromedriver 从 v90 更新到 v98 后,运行“yarn run test”时出现以下错误

@wdio/runner: TypeError: hooks.map is not a function at Object.executeHooksWithArgs

有一条日志消息表明 cucumber@6.0.5 和 cucumber@7.0.0-rc.0 都已移至 @cucumber/cucumber,所以我尝试了

yarn remove cucumber
yarn remove @types/cucumber
yarn add -D @cucumber/cucumber

但是在尝试运行测试时我仍然收到相同的错误消息,就像没有任何改变一样。我究竟做错了什么?

4

0 回答 0