Skip to content

Commit

Permalink
feat: improve stats assertion feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Brian McGee <[email protected]>
  • Loading branch information
brianmcgee committed May 10, 2024
1 parent 39b73b8 commit 53ea16a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ func cmd(t *testing.T, args ...string) ([]byte, error) {

func assertStats(t *testing.T, as *require.Assertions, traversed int32, emitted int32, matched int32, formatted int32) {
t.Helper()
as.Equal(traversed, stats.Value(stats.Traversed))
as.Equal(emitted, stats.Value(stats.Emitted))
as.Equal(matched, stats.Value(stats.Matched))
as.Equal(formatted, stats.Value(stats.Formatted))
as.Equal(traversed, stats.Value(stats.Traversed), "stats.traversed")
as.Equal(emitted, stats.Value(stats.Emitted), "stats.emitted")
as.Equal(matched, stats.Value(stats.Matched), "stats.matched")
as.Equal(formatted, stats.Value(stats.Formatted), "stats.formatted")
}

func assertFormatted(t *testing.T, as *require.Assertions, output []byte, count int) {
Expand Down

0 comments on commit 53ea16a

Please sign in to comment.