javascript - 如何配置 package.json 以在 jest 中生成 HTML 报告(我没有使用 jest.config.json 文件)
问题描述
我正在测试节点应用程序的其余 API。我有很多测试套件,所以我想为测试生成一个 html 报告,我已经安装了 jest-html-reporter。但我不知道如何在 package.json 中配置(我没有使用 jest.config.json 文件)
包.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"
}
}
解决方案
推荐阅读
- java - 我不知道为什么我的数组没有在这个冒泡排序中保存它的随机值
- java - JavaFX中的退格按钮
- javascript - 如何在反应中显示图像数组中的图像
- javascript - 从 wordpress 的管理页面使用 Ajax .load 函数会导致插件文件夹中的资产出现 404
- python - 将数组元组(?)保存为数据框
- kubernetes - 在 kubernetes 集群上使用带有 Jupyterhub 的 ray
- python - 如何停止这个python函数?
- azure - Azure DW 存储位置
- c# - Listbox.RemoveAt(n) 不释放内存
- sql - 如何“分组”一系列重叠的点坐标