最近在作jest的测试,发现关于jest的文章翻来覆去就那几篇,在这里补充一篇
这里放上连接: https://github.com/Hargne/jes...
1. 先安装 :html
yarn add jest-html-reporter --dev or npm install jest-html-reporter --save-dev
2. 固然了,在package.json中也要作相关配置。node
"jest": { "testResultsProcessor": "./node_modules/jest-html-reporter" }
3. 而后再执行yarn test就会在最外层生成test-report.html,打开它就行了。git