Skip to content

Commit

Permalink
fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
preslavgerchev authored and chris-rock committed Dec 20, 2023
1 parent c45c418 commit 30f4758
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cli/reporter/cli_reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestCompactReporter(t *testing.T) {
writer := shared.IOWriter{Writer: &buf}

r := &Reporter{
Format: Formats["compact"],
Format: Compact,
Printer: &printer.DefaultPrinter,
Colors: &colors.DefaultColorTheme,
}
Expand Down Expand Up @@ -112,14 +112,14 @@ func TestJsonOutput(t *testing.T) {
writer := shared.IOWriter{Writer: &buf}

r := &Reporter{
Format: Formats["json"],
Format: JSON,
Printer: &printer.DefaultPrinter,
Colors: &colors.DefaultColorTheme,
out: &writer,
}

r.WriteReport(context.Background(), yr)

err = r.WriteReport(context.Background(), yr)
require.NoError(t, err)
valid := json.Valid(buf.Bytes())
require.True(t, valid)

Expand All @@ -139,14 +139,14 @@ func TestJsonOutputOnlyErrors(t *testing.T) {
writer := shared.IOWriter{Writer: &buf}

r := &Reporter{
Format: Formats["json"],
Format: JSON,
Printer: &printer.DefaultPrinter,
Colors: &colors.DefaultColorTheme,
out: &writer,
}

r.WriteReport(context.Background(), yr)

err = r.WriteReport(context.Background(), yr)
require.NoError(t, err)
valid := json.Valid(buf.Bytes())
require.True(t, valid)

Expand Down

0 comments on commit 30f4758

Please sign in to comment.