【发布时间】:2022-06-15 23:27:57
【问题描述】:
我正在尝试将我的赛普拉斯配置文件转换为与赛普拉斯 10.0+ 一起使用
我已遵循新文档,但赛普拉斯声明我的文件无效。
“错误:找不到模块'cypress'”
这是我尝试使用的配置...
const { defineConfig } = require('cypress')
module.exports = defineConfig({
e2e: {
specPattern: "tests/e2e/**/*.cy.js",
supportFile: "tests/support/e2e.js"
},
projectId: "zpk6q6",
reporter: "junit",
reporterOptions: {
mochaFile: "tests/test-output-[hash].xml",
toConsole: true,
attachments: true
}
})
希望赛普拉斯社区的其他人可以帮助我。提前致谢!
【问题讨论】:
-
您是否使用直接下载获得Cypress?如果是这样,请尝试将
module.exports = defineConfig({替换为module.exports = {并删除require(此处的信息:github.com/cypress-io/cypress/issues/21999)
标签: javascript cypress