玩笑报道数据未显示在报告中

时间:2020-04-10 17:13:22

标签: node.js jestjs jest-junit

我正在尝试进行开玩笑的测试后获取测试结果和代码覆盖率数据。结果文件包含测试结果,但不包含覆盖率数据。我以玩笑为准。这是我的package.json中的内容:

  "scripts": {
    "test": "jest --verbose --silent --coverage --coverageDirectory=./",
    "start": "node server.js",
    "dev": "nodemon server.js"
  },
  "jest": {
    "testEnvironment": "node",
    "coveragePathIgnorePatterns": [
      "/node_modules/"
    ],
    "coverageReporters": [
      "text",
      "jest-junit"
    ],
    "reporters": [
      "default",
      "jest-junit"
    ]
  },
  "jest-junit": {
    "suiteName": "jest tests",
    "outputDirectory": ".",
    "outputName": "junit.xml",
    "uniqueOutputName": "false",
    "classNameTemplate": "{classname}-{title}",
    "titleTemplate": "{classname}-{title}",
    "ancestorSeparator": " › ",
    "usePathForSuiteName": "true"
  }

0 个答案:

没有答案