下午好,你们好吗?感谢您,我是新手,但不是adonis,然后按照这个主题为该项目->https://github.com/Yuri-Tiofilo/adonisTdd 1生成一个测试报告覆盖文件,并将文件.nycrc添加到项目的根文件夹并运行adonis测试命令--它不会生成此报告。有什么配置吗?
发布于 2020-05-23 19:06:17
要生成报表,请转到您拥有的package.json文件中
"scripts": {
"start": "node server.js",
"test": "node ace test"
},代之以
"scripts": {
"start": "node server.js",
"test": "nyc node ace test"
},发布于 2020-05-24 19:45:07
很酷,非常感谢你,@Onwubiko,制作、替换和添加nyc模块,它成功了,我将离开这里,为未来的兴趣
yarn add nyc或npm i nyc
2-替换package.json
"scripts": { "start": "node server.js", "test": "nyc node ace test" }, 3-在基本文件项目.nycrc中创建文件
{
"all": true,
"include": ["app/**"],
"reporter": "html",
"report-dir": "test/coverage"
}4-运行comand
npm test
工作是给我的,萨克斯。
https://stackoverflow.com/questions/61975885
复制相似问题