diff --git a/internal/format/writer_test.go b/internal/format/writer_test.go index 54c3f2a7..3d0c1af1 100644 --- a/internal/format/writer_test.go +++ b/internal/format/writer_test.go @@ -172,11 +172,7 @@ func Test_newSBOMMultiWriter(t *testing.T) { switch w := mw.writers[i].(type) { case *scanResultStreamWriter: assert.Equal(t, string(w.format), e.format) - if e.file != "" { - assert.NotNil(t, w.out) - } else { - assert.NotNil(t, w.out) - } + assert.NotNil(t, w.out) if e.file != "" { assert.FileExists(t, tmp+e.file) }