Closed
Description
My exact use case for this involves migrating from react-test-renderer
to enzyme.mount
- the former is natively supported by pretty-format
while the latter ships with a custom serializer.
Would it make sense for snapshot-diff
to support an API similar to expect.addSnapshotSerializer
? Maybe with a slightly more hygienic twist:
import snapshotDiff from "snapshotDiff";
import enzymeToJson from "enzyme-to-json/serializer";
const diff = snapshotDiff.withSerializers([enzymeToJson]);
diff(a, b); // Runs `a` and `b` through the given serializers before diffing
I'm happy to put together a PR for this over the next few days.
Metadata
Metadata
Assignees
Labels
No labels