mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
fix(coverage): don't panic if all covered files are ignored via directive (#29250)
Closes https://github.com/denoland/deno/issues/29218
This commit is contained in:
parent
5ab029db22
commit
2fe200f6ef
6 changed files with 30 additions and 1 deletions
|
@ -740,6 +740,12 @@ pub fn cover_files(
|
|||
}
|
||||
}
|
||||
|
||||
// All covered files, might have had ignore directive and we can end up
|
||||
// with no reports at this point.
|
||||
if file_reports.is_empty() {
|
||||
return Err(anyhow!("No covered files included in the report"));
|
||||
}
|
||||
|
||||
for reporter in reporters {
|
||||
reporter.done(&coverage_root, &file_reports);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue