的package.json
{
"name": "learningmocha",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "mocha && mocha test --require blanket --reporter html-cov > coverage.html"
},
"author": "",
"license": "ISC",
"devDependencies": {
"blanket": "^1.2.3",
"chai": "^3.5.0",
"mocha": "^3.2.0"
},
"config": {
"blanket": {
"pattern": [ "index.js" ],
"data-cover-never": "node-module"
}
}
}
我正在使用Mocha在nodejs中进行测试。当我在我的package.json的测试脚本中添加html-cov后运行npm测试,如上所示,那么它给我错误
“错误:无效的记者”html-cov“
您可以在此图片中看到更多内容