题目中的问题可以解决,也希望能得到前辈解决我的问题
问题描述:为什么使用 handlebars@4.5.3 可以将单元测试覆盖率报告的百分比打印出来,但使用最新的 handlebars@4.7.6 却无法打印出百分比?
handlebars@4.7.6 error 复现:
使用 handlebars@4.7.6 的时候:
- 运行命令:
$ npm run coverage
-
问题截图:
终端截图
-
浏览器报告截图:
覆盖率界面报告
-
handlebars@4.7.6 版本信息截图:
handlebars版本信息
使用 handlebars@4.5.3 的时候:
- 命令
首先 命令 or 手动删除 handlebars
然后运行👇命令
$ npm install handlebars@4.5.3
+ handlebars@4.5.3
added 3 packages from 1 contributor, updated 1 package and audited 514 packages in 6s
30 packages are looking for funding
run `npm fund` for details
found 2 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
开始单元测试命令:
$ npm run coverage
-
终端截图:
终端截图-4.5.3版本情况 -
浏览器报告截图:
浏览器截图-4.5.3版本情况 handlebars@4.5.3 版本信息截图:
4.5.3版本信息.png