-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
jest-emotion and snapshot-diff not playing nice #1898
Comments
This reads to me as "it's not working" and nothing more - I have no idea what doesn't work though. Please provide a detailed explanation of how this behaves now and how would you like it to work - it's too complicated for me to understand your issue quickly without extra information. |
Ok, I've managed to see what's your issue but it wasn't at all apparent where I should look for it as you have provided 3 different test files without pointing to a specific problem. It seems that I hope this answers your question, if not - feel free to comment back but I'm going to close this right now as I think it got answered. |
Hi @Andarist apologies for the vagueness of the request. Stemmed from a bit of a documentation void in Why I raised an issue here was because the serializer as exposed by the default export in I say it doesn't work but what's interesting is the overlap/difference between these two tests: and The output has the partially correct serialized styles hoisted from emotion (which implies the serialisation worked?) but only when it's renderered through I think the issue is probably with |
I've looked very quickly and some of my findings are:
|
Yep that appears to be the underlying problem. Thanks! |
Is there a workaround? |
Current behavior:
jest-emotion
doesn't appear to work as a serializer forsnapshot-diff
. Tried various permutations of the config and the test setup but it doesn't play nice. It's unclear if this is a problem with the docs or an API thing.To reproduce:
Minimal repo:
https://github.com/DarkPurple141/jest-emotion-typescript-minimal/tree/master
Expected behavior:
Environment information:
react
version: 16.9emotion
version: 10.0.28The text was updated successfully, but these errors were encountered: