Skip to content

Commit

Permalink
pkg/imagefilter/formatter_test: add test for exception
Browse files Browse the repository at this point in the history
Add a test for the fail-case.
  • Loading branch information
schuellerf committed Jan 27, 2025
1 parent 152bc6e commit 392df90
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/imagefilter/formatter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,9 @@ func TestSupportedOutputFormats(t *testing.T) {
assert.Contains(t, formatters, "shell")
assert.Contains(t, formatters, "short")
}

func TestResultsFormatterError(t *testing.T) {
fmter, err := NewResultsFormatter(OutputFormat("unsupported"))
assert.Error(t, err)
assert.Nil(t, fmter)
}

0 comments on commit 392df90

Please sign in to comment.