Skip to content
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

Diffing crashes app when comparing HTML Elements #2027

Closed
davidtheclark opened this issue Oct 29, 2016 · 4 comments
Closed

Diffing crashes app when comparing HTML Elements #2027

davidtheclark opened this issue Oct 29, 2016 · 4 comments

Comments

@davidtheclark
Copy link

I'm trying to compare HTML Elements in an assertion. When the assertion passes, everything is fine. But when it fails — one element does not in fact equal the other — Jest crashes.

This behavior suggests to me that the bug is somewhere in the code that diffs or stringifies the diff. However, I'm having trouble finding anything more specific to point to because I don't end up with a full stack trace, just a crashed app (after a little wait) with a little hint pointing at pretty-format.

<--- Last few GCs --->

   59728 ms: Mark-sweep 1395.0 (1450.4) -> 1394.8 (1450.4) MB, 347.5 / 0 ms [allocation failure] [GC in old space requested].
   60078 ms: Mark-sweep 1394.8 (1450.4) -> 1394.8 (1450.4) MB, 349.6 / 0 ms [allocation failure] [GC in old space requested].
   60426 ms: Mark-sweep 1394.8 (1450.4) -> 1394.8 (1450.4) MB, 348.0 / 0 ms [last resort gc].
   60746 ms: Mark-sweep 1394.8 (1450.4) -> 1394.8 (1450.4) MB, 320.1 / 0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x21cab14b4629 <JS Object>
    2: printBasicValue(aka printBasicValue) [/Users/davidclark/dev/tabbable/node_modules/jest/node_modules/jest-cli/node_modules/jest-jasmine2/node_modules/jest-matchers/node_modules/jest-diff/node_modules/pretty-format/index.js:~57] [pc=0x32e39fb2a42d] (this=0x21cab14041b9 <undefined>,val=0x2571761dc9e9 <JS Function HTMLBaseElement (SharedFunctionInfo 0x2589a3f52e79)>,printFunctionName=0x21cab...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
[1]    5926 abort      npm run jest
@davidtheclark
Copy link
Author

davidtheclark commented Oct 29, 2016

I created an issue in pretty-format about this: https://github.com/thejameskyle/pretty-format/issues/44.

@gaearon
Copy link
Contributor

gaearon commented Nov 10, 2016

Seems like same issue as #1772?

@davidtheclark
Copy link
Author

@gaearon Yes, probably! Closing.

@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants