aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/cover/heatmap_test.go
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2025-04-23 07:42:06 +0200
committerTaras Madan <tarasmadan@google.com>2025-04-25 07:57:20 +0000
commit06fa70440a4f5144d2f8ea32f9eebfa80724961d (patch)
treea04252f9d9e8cf6df9c990e896a3ecf99751f3c7 /pkg/cover/heatmap_test.go
parente3715315e5d4f79101d4cd782877608675dff0df (diff)
pkg/cover: always hide empty dirs
The last filtering step is the empty dirs removal.
Diffstat (limited to 'pkg/cover/heatmap_test.go')
-rw-r--r--pkg/cover/heatmap_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/cover/heatmap_test.go b/pkg/cover/heatmap_test.go
index 1c094f1dd..e4b490f23 100644
--- a/pkg/cover/heatmap_test.go
+++ b/pkg/cover/heatmap_test.go
@@ -179,6 +179,11 @@ func TestFormatResult(t *testing.T) {
Covered: []int64{0, 0},
Depth: 1,
},
+ {
+ Name: "file2",
+ Covered: []int64{1, 0},
+ Depth: 1,
+ },
},
Name: "dir",
Covered: []int64{1, 0},
@@ -193,6 +198,13 @@ func TestFormatResult(t *testing.T) {
Root: &templateHeatmapRow{
Items: []*templateHeatmapRow{
{
+ Items: []*templateHeatmapRow{
+ {
+ Name: "file2",
+ Covered: []int64{1, 0},
+ Depth: 1,
+ },
+ },
Name: "dir",
Covered: []int64{1, 0},
IsDir: true,