DEV Community

Discussion on: Snapshot Driven Development with Jest

Collapse
 
elthrasher profile image
Matt Morgan

Nice writeup. I think jest snapshots got a bit of a bad rap because people would snapshot giant enzyme'd component graphs for react and they'd mutate constantly, but using snapshots for APIs and things that are more stable is really helpful in my experience.

Also you can use matchers on parts of your payload that might mutate and just match any string/object/etc. jestjs.io/docs/en/snapshot-testing...

Collapse
 
ben profile image
Ben Halpern

Yeah, I think it's one of those tools which needs to be used well.