Skip to content
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

[assert helpers] ReactChildren-test #31844

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

rickhanlonii
Copy link
Member

@rickhanlonii rickhanlonii commented Dec 18, 2024

Based off #31843

Commit to review: 2c653b8

Moar tests

Copy link

vercel bot commented Dec 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 4:57pm

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Dec 18, 2024
' See https://react.dev/link/warning-keys for more information.\n' +
' in div (at **)\n' +
' in **/ReactChildren-test.js:**:** (at **)\n' +
' in **/ReactChildren.js:**:** (at **)\n' +
Copy link
Member Author

Choose a reason for hiding this comment

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

@sebmarkbage another example of the file path thing

@react-sizebot
Copy link

react-sizebot commented Dec 18, 2024

Comparing: 8f92ea4...b3ee936

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB +0.05% 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 511.38 kB 511.38 kB = 91.38 kB 91.38 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 517.53 kB 517.53 kB = 92.33 kB 92.34 kB
facebook-www/ReactDOM-prod.classic.js = 593.09 kB 593.09 kB = 104.45 kB 104.45 kB
facebook-www/ReactDOM-prod.modern.js = 583.35 kB 583.35 kB = 102.90 kB 102.90 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 5981201

Comment on lines +984 to +991
await act(() => {
root.render(
<ComponentRenderingClonedChildren>
<div />
<div />
</ComponentRenderingClonedChildren>,
);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesn't error anymore?

<div />
</ComponentRenderingMappedChildren>,
);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

no error here anymore?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah it's confusing but the toErrorDev() helper is a console.error, and since the array was empty it means there were no console errors. The assert helpers throw if a test ends with un-asserted logs, so no assertion is needed.

@rickhanlonii rickhanlonii merged commit 36d15d5 into facebook:main Dec 19, 2024
187 checks passed
@rickhanlonii rickhanlonii deleted the rh/asserts/reactchildren branch December 19, 2024 18:05
github-actions bot pushed a commit to code/lib-react that referenced this pull request Dec 19, 2024
rickhanlonii added a commit that referenced this pull request Dec 23, 2024
Based off #31844

Commit to review:
11aa104

Converts the rest of the `react` package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants