-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Spike: Evaluate options for testing library injected DOM #535
Comments
ref: #527 |
I'm not sure I understand - you're talking about something that's not React injecting DOM into a normally React-controlled DOM element? That seems fundamentally incompatible with the way React's supposed to work. |
That's exactly what it is. I agree it's not in-line with React. But a lot of people are forced to use a third party library that manipulates the DOM in some sort. I'm not sure if this idea is something that's 1) possible, or 2) an idea we'd actually want to support as the code is likely hacky. I just figured it was worth a spike as supporting it would be pretty big compared to other react testing libraries. I think if we can't support it, or we don't want to, we should have a document on how to test those types of components, and what a tests goal should be. |
A document would be great regardless. I suspect it's not a pattern we wish to support, but there's no harm in investigating it. |
I just ran into this issue using D3, definitely a frustrating experience. I ended up getting Even if enzyme doesn't solve this issue, It'd be very useful to include some info about this issue in the documentation for the benefit of future developers. Mentioning some workarounds might also be useful, such as calling |
Working with external, non-react, libraries is a pain in the react ecosystem; testing is no exception. We should see if there is anything we can do, to normalize the DOM that gets injected by third party libraries.
React's TestUtils do not currently support this, so it'd be a huge win if enzyme could.
Highcharts is a decent test library.
The text was updated successfully, but these errors were encountered: