You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using the nyc merge command to merge the coverage of my unit tests and integration tests which run separately, the resulting JSON and HTML report files are correctly merged, but I would also like to get the text summary of the merged results displayed on the CLI
There needs to be an option on the merge command to tell nyc to also display the text report of the merged results
The text was updated successfully, but these errors were encountered:
wyqydsyq
changed the title
Read merged coverage
Read merged coverage as CLI text output
Feb 25, 2019
The way I've been solving this is actually to not use the nyc merge command and instead run sequential test runs with the --no-clean flag. When you run nyc report at the end of all that, you get a nice, combined html report with all the runs together. Example:
package.json scripts:
"cover": "npm run cover:unit && npm run cover:integration && npm run cover:report",
"cover:unit": "nyc --silent mocha",
"cover:integration": "nyc --silent --no-clean mocha \"test-integration/**/*.ts\"",
"cover:report": "nyc report --reporter=lcov --reporter=html --reporter=text",
The first unit test run doesn't have the --no-clean flag. So it wipes the .nyc_output directory before starting. The integration test has the flag and just appends to the folder. The report then combines all of it.
I'm currently using the
nyc merge
command to merge the coverage of my unit tests and integration tests which run separately, the resulting JSON and HTML report files are correctly merged, but I would also like to get the text summary of the merged results displayed on the CLIThere needs to be an option on the
merge
command to tell nyc to also display the text report of the merged resultsThe text was updated successfully, but these errors were encountered: