错误 Cypress : > (0 , _cypressCucumberPreprocessor.And) 不是一个函数

问题描述 投票:0回答:2

我在尝试使用 Cypress/Cucumber 运行测试时收到此错误消息 enter image description here 我已经在所有文件中导入了关键字,并且已经安装了所有依赖项。 有任何想法吗? 阿里.

我尝试在 cypress 中运行测试

cypress cypress-cucumber-preprocessor cypress-component-test-runner cypress-intercept cypress-custom-commands
2个回答
0
投票

已解决


运行:

npm 我——强制

之后你可以运行:

npx 柏树打开


0
投票

最新版本的 cucumber 不支持“And”,您可以在功能文件中使用 And,但在 stepDefinitions 文件中您需要使用 When 而不是 And

© www.soinside.com 2019 - 2024. All rights reserved.