-
Notifications
You must be signed in to change notification settings - Fork 64
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
Output mapping functionality #48
Comments
Hi @jbrantly! I am open to any kind of improvements, but I don't think I understand your use cases clearly. Can you provide code examples? As far as I know, if you can do something with Enzyme, you can do it with Thanks! |
@adriantoine Hey, I think this would be really useful for people using CSS-in-JS tools. A lot of them are creating a lot of unnecessary noise in the snapshot files. For example, with styled-jsx:
Or with glamorous:
Having less verbose snapshot would certainly be welcomed by a lot of these tools users. Right now they make snapshot a pain to review. |
@sboudrias-aa it does look like an interesting feature. @jbrantly has started a PR a while ago, I'll see if I can implement it myself. Thanks for your feedback. |
Fixed by #56 |
Ok well I'm closing this again 😁 Just to let you know that the mapping feature will be in |
Would you be open to the addition of some form of node mapping functionality added on top of the existing serialization? Here are some use cases that I've run into where something like this could be really useful:
I'm sure there are all sorts of other use-cases that people could come up with. It would be awesome if you could specify a function somewhere that would be called for each transformed node and would have access to the raw node as well as the default JSON output which it could transform.
If this is something you would be amenable to I'd be happy to open a PR.
The text was updated successfully, but these errors were encountered: