-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow custom serializers through setSerializers
#91
feat: Allow custom serializers through setSerializers
#91
Conversation
@thymikee I haven't added any doc updates as part of this PR, but give me a shout if the direction look ok and I'll get them added to the branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I like the API, let's proceed with this. Thanks for the contribution :)
01019d8
to
bc42dd3
Compare
@thymikee Thanks - updated the branch 👍
|
bc42dd3
to
a15eb2d
Compare
Sorry for all the delay, I'll get to it next week. I'm pretty swamped with work right now 😅. |
@thymikee No worries at all, give me a shout if there's anything else that needs updated 👍 |
@thymikee No pressure on this one - just making sure it hasn't fallen off the todo list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's apply the inline feedback and take it over the finishing line :) Thanks for being so patient with my review 🙈
README.md
Outdated
const myCustomSerializer = require('./my-custom-serializer'); | ||
|
||
snapshotDiff.setSerializers([ | ||
snapshotDiff.reactSerializer // use default react serializer - add this if you want to serialise react components! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's export defaultSerializers
object so that we can spread it here
@alistairjcbrown do you need any help to get this over the finishing line? |
Provides new setSerializers function to set the serializer objects to be used before diffing. React component serializer implementation using `react-test-renderer` has been extracted out. Fixes jest-community#18 Fixes jest-community#30 Fixes jest-community#31
a15eb2d
to
6afc4a0
Compare
@thymikee Apologies, I hadn't caught up on my notifications. The branch has been updated - hopefully I've covered everything in the comments, but let me know if there's any more changes to do 👍 |
setSerializers
Thank you very much for this contribution. It's now released under v0.6.0 :) |
Provides new
setSerializers
function to set the serializer objects tobe used before diffing. React component serializer implementation using
react-test-renderer
has been extracted out.Fixes #18
Fixes #30
Fixes #31