Skip to content

Reorganize unit and benchmark tests#424

Merged
necolas merged 2 commits into
mainfrom
tests/reorganize
Nov 21, 2025
Merged

Reorganize unit and benchmark tests#424
necolas merged 2 commits into
mainfrom
tests/reorganize

Conversation

@necolas

@necolas necolas commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

The goal of these changes is to make it easier to navigate and update unit tests, while reducing the reliance on implementation details (and test-only abstractions) in tests

Refactor unit tests

  • Break up large test files into smaller test files for each API
  • Do not use 'css.props' (implementation detail) in unit tests

Remove css.props benchmark

  • It doesn't run on Hermes, so is only a proxy for React Native perf
  • It has been replaced by e2e React Native tests (Fantom) internally
  • The API itself doesn't exist on web and the plan is to remove it from native

* Break up large test files into smaller test files for each API
* Do not use 'css.props' (implementation detail) in unit tests
@meta-cla meta-cla Bot added the cla signed label Nov 21, 2025
@github-actions

Copy link
Copy Markdown

workflow: benchmarks/size

Comparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.

Results Base Patch Ratio
react-strict-dom/dist/web/index.js
· compressed 3,251 3,251 1.00
· minified 10,375 10,375 1.00
react-strict-dom/dist/web/runtime.js
· compressed 1,645 1,645 1.00
· minified 4,131 4,131 1.00
react-strict-dom/dist/native/index.js
· compressed 16,232 16,232 1.00
· minified 62,962 62,962 1.00

This native benchmark is being removed for the following reasons:
* It doesn't run on Hermes, so is only a proxy for React Native perf
* It has been replaced by e2e React Native tests (Fantom) internally
* The API itself doesn't exist on web and the plan is to remove it from
  native
@github-actions

Copy link
Copy Markdown

workflow: benchmarks/perf (native)

Comparison of performance test results, measured in operations per second. Larger is better.

Results Base Patch Ratio
css.create
· small 1,136,369 1,144,670 1.01 +
· small with units 495,175 496,230 1.00 +
· small with variables 671,829 675,372 1.01 +
· several small 353,169 351,396 0.99 -
· large 199,540 200,686 1.01 +
· large with polyfills 146,997 149,132 1.01 +
· complex 102,779 103,451 1.01 +
· unsupported 210,392 210,451 1.00 +
css.createTheme
· simple theme 226,362 225,035 0.99 -
· polyfill theme 213,907 213,661 1.00 -
css.props
· small 229,178
· small with units 185,823
· small with variables 111,628
· small with variables of units 82,493
· large 96,342
· large with polyfills 38,122
· complex 21,871
· unsupported 138,476
· simple merge 159,253
· wide merge 16,800
· deep merge 16,683
· themed merge 32,195

@necolas necolas merged commit 055b95d into main Nov 21, 2025
7 checks passed
@necolas necolas deleted the tests/reorganize branch November 24, 2025 02:00
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.

1 participant