Skip to content

[test] Assert client-rendered content for a rejected lazy element - #37213

Merged
eps1lon merged 1 commit into
react:mainfrom
SidiEyel:test-assert-lazy-element-client-render
Sep 10, 2026
Merged

eps1lon merged 1 commit into
react:mainfrom
SidiEyel:test-assert-lazy-element-client-render

Conversation

@SidiEyel

@SidiEyel SidiEyel commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

should client render a boundary if a lazy element rejects left its client-render assertion commented out, so the test only checked loggedErrors. The sibling test should client render a boundary if a lazy component rejects has the same comment 100 lines above with the assertion live.

This enables the assertion so the test covers the client render too.

How did you test this change?

  • yarn test ReactDOMFizzServer (216 tests passed)
  • yarn test ReactDOMFizzServer --prod (216 tests passed)
  • Confirmed the assertion is meaningful by changing the expected value to <div>WRONG</div>, which fails
  • yarn prettier
  • yarn linc

@meta-cla meta-cla Bot added the CLA Signed label Aug 5, 2026
@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Comparing: a58f939...6730c64

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 = 7.35 kB 7.35 kB = 1.96 kB 1.96 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 625.29 kB 625.29 kB = 110.54 kB 110.54 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 7.36 kB 7.36 kB = 1.96 kB 1.96 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 696.51 kB 696.51 kB = 121.97 kB 121.97 kB
facebook-www/ReactDOM-prod.classic.js = 716.36 kB 716.36 kB = 125.38 kB 125.38 kB
facebook-www/ReactDOM-prod.modern.js = 706.67 kB 706.67 kB = 123.81 kB 123.81 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by sizebot against 6730c64

The test for a lazy element that rejects left its client-render assertion
commented out, so it only checked the logged errors. The sibling test for a
rejected lazy component asserts the rendered output directly.

This enables the assertion so the test covers the client render too.
@eps1lon
eps1lon force-pushed the test-assert-lazy-element-client-render branch from d2782d1 to 6730c64 Compare September 10, 2026 12:00

@eps1lon eps1lon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

@eps1lon
eps1lon merged commit 82c44be into react:main Sep 10, 2026
239 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants