Skip to content

Commit

Permalink
Don't include ungrouped coverage stats
Browse files Browse the repository at this point in the history
  • Loading branch information
JonJagger committed Oct 29, 2024
1 parent 7190f51 commit 0da74a8
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions test/lib/simplecov_json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ class JSONFormatter
def format(result)
groups = {}
result.groups.each do |name, file_list|
groups[name] = {
lines: {
total: file_list.lines_of_code,
covered: file_list.covered_lines,
missed: file_list.missed_lines
},
branches: {
total: file_list.total_branches,
covered: file_list.covered_branches,
missed: file_list.missed_branches
if name != "Ungrouped"
groups[name] = {
lines: {
total: file_list.lines_of_code,
covered: file_list.covered_lines,
missed: file_list.missed_lines
},
branches: {
total: file_list.total_branches,
covered: file_list.covered_branches,
missed: file_list.missed_branches
}
}
}
end
end
data = {
timestamp: result.created_at.to_i,
Expand Down

0 comments on commit 0da74a8

Please sign in to comment.