fix(coverage): do not report transpiled files with no lines (#14699)

This commit omits files from the coverage report that have no
lines of code to report coverage for.

Fixes: https://github.com/denoland/deno/issues/14683
This commit is contained in:
Colin Ihrig 2022-05-22 10:45:22 -04:00 committed by GitHub
parent 75315dfe00
commit d55444b41c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 104 additions and 1 deletions

View file

@ -703,7 +703,9 @@ pub async fn cover_files(
&out_mode,
);
reporter.report(&coverage_report, original_source)?;
if !coverage_report.found_lines.is_empty() {
reporter.report(&coverage_report, original_source)?;
}
}
reporter.done();