Skip to content

[Testing] Upgrading to 1.1.0 and above causes tests to fail, Javascript heap out of memory #562

@Ardhimas

Description

@Ardhimas

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 or SelectField components. Could this issue be related to the recent 'smart' positioning menus?

Images/Screenshots

image
image
After downgrading, the tests pass again.
image

Version

  • React - 15.6.1
  • React-MD - 1.1.5, but issue first seen in 1.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions