-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
ReactTestRenderer: Invariant Violation: getNodeFromInstance: Invalid argument. #8324
Comments
Nevermind, just found it's not supported: #7371 |
Yea sorry, refs can work but |
* Upgrade dependencies to fix build breakages We've had some lint-related build failures: https://travis-ci.org/graphql/graphiql/builds/181453346 lately. Unfortunately, these masked test failures introduced by 35d8d38. When we fixed the lint (1eeb36c), the test failures showed up: https://travis-ci.org/graphql/graphiql/builds/182431531 This commit fixes that by upgrading our deps: - Replace "react-addons-test-utils", which access a path that doesn't exist in current "react-dom", with "react-test-renderer". This required some API updates in the tests, but also some changes to use ref-based DOM node access rather than `ReactDOM.findDOMNode`, which doesn't work in "react-test-renderer". See: - facebook/react#7371 - facebook/react#8324 > Yea sorry, refs can work but `findDOMNode()` can't (we tried). * Update package.json
I also have a problem.... |
If you mean you're using |
I came upon this issue after upgrading from Enzyme 2 to Enzyme 3. If anyone experiences this when upgrading Enzyme, it can be fixed by disabling testing of the lifecycle methods: configure({
adapter: new Adapter(),
disableLifecycleMethods: true,
}) |
I'm following the example at https://facebook.github.io/jest/docs/tutorial-react.html#content in order to use snapshots with jest.
I run into a bug within
react-test-renderer
, it seems to fail whenever findDOMNode is used on a component instance.Minimal code to replicate the bug:
The Error:
React versions:
The text was updated successfully, but these errors were encountered: