-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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] Make tests compatible with React 19 #43155
Conversation
Netlify deploy previewhttps://deploy-preview-43155--material-ui.netlify.app/ Bundle size report |
const expectedCallHistory = | ||
reactMajor === 19 ? [null, 'one', 'one', 'four'] : [null, 'one', 'four']; | ||
|
||
expect(handleHighlightChange).to.deep.equal(expectedCallHistory); |
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'm not sure why this one (or the similar one for joy) happened, might be something related to the Strict mode changes, but the explanation on the upgrade guide is not very detailed.
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.
Looks good! I left some comments, most of them directed at making tests a bit more future-proof by checking for reactMajor >= 19
instead of reactMajor === 19
so we don't need to modify tests once React 20 is out (if no specific changes affect the tests, of course).
@aarongarciah I implemented the future-proofing changes for future React versions, and replied to the other questions |
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.
Amazing ✨
Part of: #42824
Adapt to React 19 in our tests. Most of the changes are explained by either:
For the ones that are not explained by these changes, I left comments on.
These commits were cherry-picked from #42824.