-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Tests fail when a function is passed as prop #41
Comments
Thank-you for the detailed bug report 🙂. The stack trace you posted points to this line. In a browser environment, That code looks a bit odd to me, it apparently relates to preactjs/preact#1590 though. So in brief, the issue is with the Preact library rather than the Enzyme adapter. |
I filed an issue with the Preact library. For now a workaround is to set the |
Thanks for the fast reply, wasn't sure if the issue was more related to preact or the adapter. Your workaround seems to work nicely, I'll use it until they fix the bug in preact, keep up the good work! |
Hello! I'm trying to use this adapter on a project running on the latest preact (v10.0.0-beta.1).
However I've found a big issue when I try to test components which pass functions to their children as props, they yield me this error (I'm using jest as test runner):
This render function yields the error:
while this not:
I'm testing this componente like this:
I've created an example repo to better show off the problem here.
I've tried to track the bug but with no success, the stacktrace does not make much sense to me :/
The text was updated successfully, but these errors were encountered: