-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Preact support? #227
Comments
The only way i can see that it would really be generalizeable is if it imported all react-specific things from the configured enzyme adapter - that way, a preact adapter could supply whatever functionality was needed. |
Yeah, I was thinking the same. Not sure what is involved there, I need to take some time to look at how some of their other adaptors work. Would you be open to a pull request? BTW, the work around is to install React as a dev dependency. So far everything works when I do that. |
@JamesMcMahon said:
I can confirm that merely adding react as a dev dependency got past this error: I'm not sure if there are any possible discrepancies between how react and preact might cause enzyme to render the components. This could cause some tests to be less reliable. But, at least the workaround allows me to have tests, so I can't complain too much. 😄 |
Currently,
chai-enzyme
doesn't work with the Preact library.It fails with the stack trace:
With the issue coming from the React import in
reactNodeToString.js
.I haven't looked deeply into this, but I was wondering if it was possible to decouple this library from React and be able to use a library like Preact.
The text was updated successfully, but these errors were encountered: