-
-
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
TypeError: this._getEventHandlerFor is not a function #2456
Comments
What version of jsdom are you using? What exact error are you getting, on what code? What jest config are you using, including any setup code? |
16.4.0 The thing that causes this is upgrading jest from 24.9.0 to 26.5.2 (or 25..). My guess is that it has to do with the transitive jsdom dependencies.
I get the same error as in #2436. It's unclear from the stack trace where it happens, but it seems to be during setup:
The setup code is exactly the same as in #2436 My jest config is:
|
If you're getting an error from inside jsdom, then that's a bug in jsdom that you should file there. Specifically for react-native, though, there doesn't yet exist a react-native adapter for enzyme, and you're using a react web adapter. #1436 tracks a proper adapter. |
Thanks, I'm aware of all this. I would be great to use this new adapter when it's ready, but in the meantime enzyme seems to recommend this approach, here. I just noticed that the recommended configuration changed. I will try that. |
Current behavior
This is a duplicate of #2436, but for a different environment. Downgrading to jest@24.9.0 makes this issue go away. Upgrading to >=25, makes this issue surface, but this seems to be because it seems I get an older version of https://github.com/jsdom/jsdom
Your environment
API
Version
Adapter
The text was updated successfully, but these errors were encountered: