Skip to content

Conversation

@DiegoAndai
Copy link
Member

@DiegoAndai DiegoAndai commented Aug 2, 2024

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.

@DiegoAndai DiegoAndai added package: material-ui integration: react About improving React support. labels Aug 2, 2024
@DiegoAndai DiegoAndai self-assigned this Aug 2, 2024
@mui-bot
Copy link

mui-bot commented Aug 2, 2024

Netlify deploy preview

https://deploy-preview-43155--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against ff53059

Comment on lines 3006 to 3009
const expectedCallHistory =
reactMajor === 19 ? [null, 'one', 'one', 'four'] : [null, 'one', 'four'];

expect(handleHighlightChange).to.deep.equal(expectedCallHistory);
Copy link
Member Author

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.

@DiegoAndai DiegoAndai requested review from aarongarciah, michaldudak and mnajdova and removed request for michaldudak and mnajdova August 2, 2024 19:33
Copy link
Member

@aarongarciah aarongarciah left a 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).

@DiegoAndai
Copy link
Member Author

@aarongarciah I implemented the future-proofing changes for future React versions, and replied to the other questions

@DiegoAndai DiegoAndai requested a review from aarongarciah August 5, 2024 16:38
Copy link
Member

@aarongarciah aarongarciah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing ✨

@DiegoAndai DiegoAndai merged commit 562d662 into mui:next Aug 5, 2024
@DiegoAndai DiegoAndai deleted the react-19-compatible-tests branch August 5, 2024 18:42
DiegoAndai added a commit to DiegoAndai/material-ui that referenced this pull request Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration: react About improving React support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants