【发布时间】:2022-01-30 10:39:58
【问题描述】:
这是我的 package.json:
{
"name": "cypressautomation",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "/node_modules/.bin/cypress run "
},
"author": "",
"license": "ISC",
"devDependencies": {
"cypress": "^9.2.0",
"mochawesome": "^7.0.1",
"mochawesome-merge": "^4.2.1",
"mochawesome-report-generator": "^6.0.1"
},
"dependencies": {
"cypress-iframe": "^1.0.1"
}
}
我已经构建了一些测试脚本,在我保存所有文件并运行 npm run test 后,我得到了错误:
cypressautomation@1.0.0 测试 > /node_modules/.bin/cypress 运行 系统找不到指定的路径。
【问题讨论】:
-
您在
package.json的scripts部分下没有名为test的脚本。
标签: javascript cypress package.json