diff --git a/syft/format/syftjson/encoder_test.go b/syft/format/syftjson/encoder_test.go index f11a9e79af3..64346217395 100644 --- a/syft/format/syftjson/encoder_test.go +++ b/syft/format/syftjson/encoder_test.go @@ -297,10 +297,15 @@ func TestEncodeFullJSONDocument(t *testing.T) { }, } + cfg := DefaultEncoderConfig() + cfg.Pretty = true + enc, err := NewFormatEncoderWithConfig(cfg) + require.NoError(t, err) + testutil.AssertEncoderAgainstGoldenSnapshot(t, testutil.EncoderSnapshotTestConfig{ Subject: s, - Format: NewFormatEncoder(), + Format: enc, UpdateSnapshot: *updateSnapshot, PersistRedactionsInSnapshot: true, IsJSON: true,