Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork6.6k
fix(pretty-format): Handle empty string children in React same asreact-test-renderer#14470
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
fix(pretty-format): Handle empty string children in React same asreact-test-renderer#14470
Uh oh!
There was an error while loading.Please reload this page.
Conversation
netlifybot commentedSep 5, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview forjestjs ready!Builtwithout sensitive environment variables
To edit notification comments on pull requests, go to yourNetlify site configuration. |
| getChildren(item,children); | ||
| }); | ||
| }elseif(arg!=null&&arg!==false){ | ||
| }elseif(arg!=null&&arg!==false&&arg!==''){ |
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 is the breaking change
| React.createElement('Mouse',null,''), | ||
| '<Mouse>\n \n</Mouse>', | ||
| ); | ||
| assertPrintedJSX(React.createElement('Mouse',null,''),'<Mouse />'); |
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 shows the change that will show up in people's snapshots
6350ca8 tof0fefaeCompareSimenB commentedSep 19, 2023
I missed this made the tests time out on circle ci...1a96a5c fixes it |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
I tried to upgrade the entire repo to React 18 (for#14463), and it turns out
react-test-renderer@18has a change in how it handles empty string children. Which is fine, but aligning is a breaking change in Jest.Test plan
Adjusted the test