如何在React JS中生成Cobertura覆盖率报告

时间:2019-08-04 13:29:24

标签: reactjs unit-testing cobertura

我正在尝试生成cobertura-coverage.xml以便在jenkins上运行React的测试代码覆盖率报告。但是它不是生成的 那是我的packger.json文件:

"scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --coverage --reporters=default --reporters=jest-junit --watchAll",
    "eject": "react-scripts eject",
    "test:ci": "CI=true react-scripts test --coverage --reporters=default --reporters=jest-junit  --no-watchman"
  },
  "jest-junit": {
    "output": "output/coverage/junit/junit.xml",
    "usePathForSuiteName": "true"
  },
  "coverageReporters": [
    "text",
    "cobertura"
  ]

0 个答案:

没有答案