Node.js 如何在单个命令中使用mochawesome和mocha sonarqube报告?

Node.js 如何在单个命令中使用mochawesome和mocha sonarqube报告?,node.js,sonarqube,mocha.js,nyc,mochawesome,Node.js,Sonarqube,Mocha.js,Nyc,Mochawesome,我的package.json文件中有以下脚本,用于检查UT的代码覆盖率: "coverage": "nyc --reporter=lcov --reporter=cobertura mocha ./test/apis_new/* --reporter mocha-sonarqube-reporter --reporter-options output=xunit.xml mocha ./test/apis_new/* --reporter mochawesome -

我的package.json文件中有以下脚本,用于检查UT的代码覆盖率:

"coverage": "nyc --reporter=lcov --reporter=cobertura mocha ./test/apis_new/* --reporter mocha-sonarqube-reporter --reporter-options output=xunit.xml mocha ./test/apis_new/* --reporter mochawesome --exit"
当我运行上述命令时,只生成mochawesome report文件夹,但没有xunit.xml这样的文件

如果我在已更改mochawesome和sonarqube顺序的地方运行以下命令,xunit.xml正在生成,但未生成mochawesome报告文件夹:

"coverage": "nyc --reporter=lcov --reporter=cobertura mocha ./test/apis_new/* --reporter mochawesome mocha ./test/apis_new/* --reporter mocha-sonarqube-reporter --reporter-options output=xunit.xml --exit"
我做错了什么?
这是在一个脚本中同时使用两者的正确方法吗?

从本质上讲,mocha只支持一个报告程序,因此所有的行为都与预期一样,只使用一个报告程序(可能是第一个)

退房。我使用它来生成
xunit
spec
输出