-
-
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
Out of memory when snapshotting react-sortable-hoc #3464
Comments
You are right, snapshotting should not crash but the problem here is likely that Jest is inspecting something in the rendered component tree which, when accessed, produces an error. There is not really anything we can do about this and it is probably better to go hunting for the issue in the other library. |
I have the same issue when rendering with Enzyme and React Router. I realize it's not a Jest issue, but could Jest catch OOM and give a better error message than "Invalid string length"? |
I’ve spent some time to debug this issue too. I had a react-hotkeys component like this: <HotKeys attach={window} focused {...rest}>{children}</HotKeys> The issue could be also reproduced like this: expect(window).toMatchSnapshot(); More clear error message in this case would be very helpful. |
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. |
Jest/Node crashes after a memory leak when trying to snapshot a component that contains an element connected with react-sortable-hoc by @clauderic
I can't tell whether the problem is with the library or with Jest, but my first guess would be that snapshotting should not crash on any component, so I posted it here.
Jest 19.0.2, Node 7.9.0 on macOS 10.12.4
The actual error (which Google tells me is basically out of memory):
RangeError: Invalid string length
The text was updated successfully, but these errors were encountered: