-
-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Testing] Upgrading to 1.1.0 and above causes tests to fail, Javascript heap out of memory #562
Comments
To help debug this, could you provide the version of |
jest: 20.0.4 |
Thanks! |
Thank you for the help! Let me know if there is anything else I could do to help you. |
@mlaursen I spent a few hours attacking this issue today and I've come to a few definitive conclusions
The solution I came up with is using I'm going ahead with my solution for now, but the actual issue with |
Thanks for looking into this so deeply @Ardhimas. I haven't really been able to debug it much since it wasn't happening for me. I'm curious if it has to do anything with this bug for snapshot testing. The If you have a test case that is guaranteed to fail each time, I would like to see it so I can debug a bit more. I think it would also be helpful to let me know what version of |
@mlaursen [https://github.com/Ardhimas/react-sandbox](I whipped up a quick app to show you the issue.) Go ahead and run |
It appears so. Setting the |
I think updating the defaultProps is a pretty nice and succinct solution, even if it doesn't tackle the core problem at hand. |
Nevermind, doesn't look like that will work either. |
It seems that update is on its way |
Awesome. It just got merged 18 minutes ago, just gotta wait for the next Jest release. |
Closing this due to inactivity so I'm guessing this is no longer a problem? I'll re-open it and target to v2 if someone is still running into this. |
Description
I upgraded react-md from 1.0.19 to 1.1.0 and ran into these issues, I just tried upgrading to 1.1.5 and still ran into the issues. I initialized the app using create-react-app and have never had any issues like this. It appears the issue is occurring in snapshot tests that I'm using enzyme to shallow render with the aid of enzyme-to-json. The issue isn't with either of the testing methods, as I tried downgrading and the issues disappeared. I've dug around and found an issue where jest can experience memory leaks when running tests with the
--coverage
flag but I'm experiencing the issue whether I run it with or without the flag.I understand that this issue may be a problem with my app, and if that is the case I apologize for asking for help here. However, as the issue disappears when I downgrade back to 1.0.19 I believe it may be related to a change, though I can't seem to pinpoint the source of the problem.
If anyone has any idea where the problem could be, I would greatly appreciate any pointers.
EDIT: I believe the issue is related to this issue in Jest.
EDIT 2: I've pinpointed the issue to snapshot tests for components that contain either the
Menu
orSelectField
components. Could this issue be related to the recent 'smart' positioning menus?Images/Screenshots
After downgrading, the tests pass again.
Version
The text was updated successfully, but these errors were encountered: