-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Render JSX in t.snapshot arguments #1214
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
Comments
I wonder if we could advocate JSX transforms that just do this for |
Nope, there wasn't any specific behavior inside |
Jut so I'm sure I understand: Why do we wish to have a new t.deepEqual(<This/>, <That/>); creates an unreadable object that does not look like what you expect to see in the DOM? |
I think this comes down to #1175. We can't do a generic |
@jfmengels I thought to add it, just to clearly indicate for 3rd-party babel plugins what JSX needs to be transformed. @novemberborn Actually, this issue can be closed, since goal is to not have restrictive preferences and be open & universal to all JSX-based libraries. I should create a new issue describing my thoughts and a possible route we can take.
I don't have experience in that area, so I can't argue with this. If it's just easy as detecting One thought: would this confuse users who'd use |
Detecting JSX nodes is pretty easy, yeah.
You can't use that to compare objects though, can you? |
Nope, but I'm wondering if users will assume |
That confusion doesn't seem exclusive to JSX object comparisons. |
Yes, also true. |
New developments on this issue. It's now centered around Renderers:
User should be free to choose any test renderer they desire, but in case we already have a babel plugin for it, they can just go with that. |
We'd be happy to promote plugins written for this purpose, but this isn't something that AVA needs to support by itself. |
See #1154 (comment). During the development of magic-assert PR, we decided to extract
t.jsxEqual
from it and land it bit later with a more clear purpose.Also related #1175
The text was updated successfully, but these errors were encountered: