karma-coverage通过浏览器显示 安装插件命令 npm i -D karma karma-coverage 修改angular.json的配置文件,为每次运行都创建代码覆盖率报告 "test":{ "options":{ "codeCoverage":true } }