-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
[test] Transpile more similar to prod bundle #25406
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we've ever had a problem but let's be safe.
We had one problem in material-ui-x related to this mui/mui-x#666.
Having 3-4 years of almost no issues might suggest that change if it yields a value, is marginal. Did you look into the cost of the change? How much slower will the dev env will be?
That's a non-goal of this change. We shouldn't ever dissect the plugins based on performance. If this is/was/will be a problem we need to set up test infra for dev and prod. |
I have tried to rerun the test but it keeps failing, it doesn't seem to be a flaky one. |
Yeah, already investigating. |
Test failure was expected but not anticipated. Fixed with |
React.useEffect(() => {}); | ||
React.useEffect(() => {}); | ||
|
||
return <Child />; | ||
return <Child rerender={state} />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This meant that React bailed out of re-rendering <Child />
when calling setState(1)
because <Child />
was hoisted.
Generally we want to test as similar as possible to production environments to make debugging easier. I moved some babel plugins into the default plugins to make testing more similar to prod. I don't think we've ever had a problem but let's be safe.
date-mui-test
will ultimately be removed as well. Though it's used fairly often in pickers so I want to take a gradual approach or rather do it while refactoring the pickers.