-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
react-test-renderer does not work with ref methods #5462
Comments
Do you have a repro of that? Does |
@thymikee Here is a repo https://github.com/mildrenben/jest-ref-issue I believe it's being thrown by |
You've linked to the correct issue in react's tracker - |
Also see React docs about Either way, this is not a jest issue |
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
Ref methods cause an error to be thrown
If the current behavior is a bug, please provide the steps to reproduce and
either a repl.it demo through https://repl.it/languages/jest or a minimal
repository on GitHub that we can
yarn install
andyarn test
.Cannot read property 'addEventListener' of null
What is the expected behavior?
For refs to work and have usable mock methods. I did some digging through other issues and it looks like this was fixed here facebook/react#7740 but I'm not sure if ref DOM methods were ever fixed.
Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
MacOS
react-test-renderer @ 16.2.0
jest @ 21.2.1
react @ 16.1.1
node @ 8.2.1
yarn @ 0.27.5
The text was updated successfully, but these errors were encountered: