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

Replace test renderer's fake Scheduler implementation with mock build #14970

Merged
merged 2 commits into from
Feb 28, 2019

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Feb 28, 2019

The test renderer has its own mock implementation of the Scheduler interface, with the ability to partially render work in tests. Now that this functionality has been lifted into a proper mock Scheduler build, we can use that instead.

The changes to the test are mostly a straightforward find-and-replace. There were a few that relied on dynamic injection to override the now HostConfig method. I updated those tests to use Jest module mocking instead.

@sizebot
Copy link

sizebot commented Feb 28, 2019

Details of bundled changes.

Comparing: 53e787b...1c236d1

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js +3.1% +3.0% 492.17 KB 507.38 KB 104.08 KB 107.19 KB UMD_DEV
react-test-renderer.production.min.js 🔺+5.1% 🔺+5.5% 63.72 KB 66.95 KB 19.52 KB 20.59 KB UMD_PROD
react-test-renderer.development.js -0.3% -0.4% 486.61 KB 484.93 KB 102.77 KB 102.36 KB NODE_DEV
react-test-renderer.production.min.js -0.4% -0.6% 63.38 KB 63.12 KB 19.18 KB 19.07 KB NODE_PROD
ReactTestRenderer-dev.js -0.3% -0.4% 496.67 KB 494.98 KB 102.38 KB 101.97 KB FB_WWW_DEV
react-test-renderer-shallow.development.js 0.0% -0.0% 37.2 KB 37.2 KB 9.5 KB 9.5 KB UMD_DEV
react-test-renderer-shallow.production.min.js 0.0% -0.0% 11.12 KB 11.12 KB 3.35 KB 3.35 KB UMD_PROD
react-test-renderer-shallow.development.js 0.0% -0.0% 31.5 KB 31.5 KB 8.14 KB 8.14 KB NODE_DEV
react-test-renderer-shallow.production.min.js 0.0% -0.0% 11.77 KB 11.77 KB 3.66 KB 3.65 KB NODE_PROD

Generated by 🚫 dangerJS

The test renderer has its own mock implementation of the Scheduler
interface, with the ability to partially render work in tests. Now that
this functionality has been lifted into a proper mock Scheduler build,
we can use that instead.
@acdlite acdlite merged commit ccb2a8a into facebook:master Feb 28, 2019
@NE-SmallTown
Copy link
Contributor

related: #14969

NMinhNguyen referenced this pull request in enzymejs/react-shallow-renderer Jan 29, 2020
… (#14970)

* Replace test renderer's fake Scheduler implementation with mock build

The test renderer has its own mock implementation of the Scheduler
interface, with the ability to partially render work in tests. Now that
this functionality has been lifted into a proper mock Scheduler build,
we can use that instead.

* Fix Profiler tests in prod
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.

5 participants