如何配置package.json以在jest中生成HTML报告(我没有使用jest.config.json文件)

时间:2019-05-23 07:05:41

标签: javascript node.js jestjs

我正在测试节点应用程序的其余API。我有很多测试套件,所以我想为测试生成一个html报告,我已经安装了jest-html-reporter。但是我不知道如何在package.json中配置(我没有使用jest.config.json文件)

package.json

{
  "name": "products_api",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "jest"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "express": "^4.17.0",
    "fs": "0.0.1-security",
    "jest": "^24.8.0",
    "jest-html-reporter": "^2.5.0",
    "joi": "^14.3.1",
    "mongodb": "^3.2.5",
    "redis": "^2.8.0",
    "supertest": "^4.0.2",
    "util": "^0.12.0"
  }
}

0 个答案:

没有答案