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

Remote .internal override from untrusted URL tests #26372

Merged

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Mar 11, 2023

Adding .internal to a test file prevents it from being tested in build mode. The best practice is to instead gate the test based on whether the feature is enabled.

Ideally we'd use the @gate pragma in these tests, but the itRenders test helpers don't support that.

@acdlite acdlite requested a review from sebmarkbage March 11, 2023 20:27
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Mar 11, 2023
@acdlite acdlite force-pushed the remote-internal-from-untrusted-url-tests branch from b3bc47d to 4748b3e Compare March 11, 2023 20:30
@react-sizebot
Copy link

react-sizebot commented Mar 11, 2023

Comparing: 6334614...d18ca07

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.min.js = 156.85 kB 156.85 kB = 49.61 kB 49.61 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 158.86 kB 158.86 kB = 50.29 kB 50.29 kB
facebook-www/ReactDOM-prod.classic.js = 539.31 kB 539.31 kB = 95.93 kB 95.93 kB
facebook-www/ReactDOM-prod.modern.js = 523.17 kB 523.17 kB = 93.62 kB 93.62 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against d18ca07

Adding `.internal` to a test file override prevents it from being tested
in build mode. The best practice is to instead gate the test based on
whether the feature is enabled.

Ideally we'd use the `@gate` pragma in these tests, but the `itRenders`
test helpers don't support that.
@acdlite acdlite force-pushed the remote-internal-from-untrusted-url-tests branch from 4748b3e to d18ca07 Compare March 11, 2023 20:35
@acdlite acdlite merged commit f411e89 into facebook:main Mar 11, 2023
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