Skip to content

Commit

Permalink
Keep empty packages by default
Browse files Browse the repository at this point in the history
  • Loading branch information
dnephin committed Aug 20, 2023
1 parent 6c8ab6b commit 73dfa81
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion testjson/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func testDoxFormat(out io.Writer, opts FormatOptions) EventFormatter {
if !event.Action.IsTerminal() {
return nil
}
if len(results[event.Package]) == 0 {
if opts.HideEmptyPackages && len(results[event.Package]) == 0 {
// No testdox for you
return nil
}
Expand Down
2 changes: 2 additions & 0 deletions testjson/testdata/format/testdox-coverage.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
gotest.tools/gotestsum/testjson/internal/badmain:

gotest.tools/gotestsum/testjson/internal/good:
✓ Nested success (0.00s)
✓ Nested success a (0.00s)
Expand Down
2 changes: 2 additions & 0 deletions testjson/testdata/format/testdox-shuffle.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
gotest.tools/gotestsum/testjson/internal/badmain:

gotest.tools/gotestsum/testjson/internal/good:
✓ Nested success (0.00s)
✓ Nested success a (0.00s)
Expand Down
4 changes: 4 additions & 0 deletions testjson/testdata/format/testdox.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
gotest.tools/gotestsum/testjson/internal/badmain:

gotest.tools/gotestsum/testjson/internal/empty:

gotest.tools/gotestsum/testjson/internal/good:
✓ Nested success (0.00s)
✓ Nested success a (0.00s)
Expand Down

0 comments on commit 73dfa81

Please sign in to comment.