snapshooter icon indicating copy to clipboard operation
snapshooter copied to clipboard

Exclude from serialize process the ignore fields

Open glucaci opened this issue 5 years ago • 1 comments

If we haven an object with ignored field e.g.:

expected.MatchSnapshot(options => options.IgnoreField("Content"));

the field "Content" should not be serialized because may have a type which is not serializable.

glucaci avatar Jun 13 '19 06:06 glucaci

any movement on this?

jannickj avatar Jul 23 '20 13:07 jannickj

My proposal is to create a new match option called .ExcludeField("Content"), which removes the specified field(s) from the snapshot. The IgnoreField is really only to ignore the field, but not change the snapshot output.

nscheibe avatar Nov 10 '22 12:11 nscheibe