-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Material UI breaks all tests on react v16 #8643
Comments
Do you have a stacktrace? |
Oh, it's for the legacy version. Sorry, I can't help for this one. |
And is there a migration guide for v1? Many of us have code that is utilizing v0.19. I would love to upgrade to v1, but it also breaks all my site :( v1 is not even released (its still in beta). |
@austinh We still accept PR fixes. If you find a fix, we will definitely review it :). Last one was this morning #8634. What I'm saying is that I have low incentive in spending time on v0.x issues.
There is one that needs to be completed. |
My tests had this same error message. If you're using MomentJS, the problem probably comes from that framework. The last version of Moment must be downgraded to "2.18.1". For me, the solution was:
|
@oliviertassinari - Definitely a negative behavior to close requests on what is still considered the stable version of material-ui. This is something you should be continuing to fix and maintain until v1.0 has been released. In the mean time, I too am running into this issue with 0.19.4 and would love to see a fix. |
@hyalen your fix did not work, I downgraded moment, reinstalled modules, and the error persisted.
|
HA, I found the issue... JSDOM has not implemented SVG and therefor breaks fibers rendering within JSDOM. A fix should be in soon: jsdom/jsdom#2011. |
@jwaldrip This is open source, I'm not in the business of philanthropy. I work and share the work on the issues I need to move forward. It doesn't mean you are entitled to free work from me. Still, I have some incentives in keeping the v0.x branch in a reasonable state. I will invest time in improving the migration guide to v1.x. My biggest priority for the v0.x branch is fixing #8040. |
No one is expecting you yourself to fix it, but closing the issue entirely means other people won’t see this issue, and are less likely to also offer fixes. I looked into fixing it myself, but I don’t have nearly the expertise in this libraries internal workings to even know where to start. I opened this issue with the hope that someone (not even necessarily you) would be able to help. |
@austinh Yes, it's on purpose, the priority for ongoing work is the v1-beta branch. Closing this issue help keeping the focus on that branch. |
@jwaldrip you could use
and run your test with
|
I upgraded to React v16 and chai-enzyme v3, and any component test that I have that utilizes Material ui (particularly MuiThemeProvider) that is
mounted
throws various errors like the following:TypeError: Cannot set property 'stroke' of undefined
TypeError: Cannot set property 'display' of undefined
I tried to create a codepen to make an example but i was unable to setup enzyme test runner.
Expected Behavior
React v16 and material ui together should not break all tests.
Current Behavior
Material UI combined with enzyme 3 and react v16 break all tests
Note: this does not effect the actual components in a browser, only in the test environment when
mounted
via enzyme, and that mounted component also happens to use MuiThemeProvider.Context
Cannot upgrade to react v16, this is the last thing I need to fix to get my tests running and finally upgrade.
The text was updated successfully, but these errors were encountered: