dillon1000/react

Commit

Run persistent mode tests in CI (#15029)

* Add command to run tests in persistent mode

* Convert Suspense fuzz tester to use noop renderer

So we can run it in persistent mode, too.

* Don't mutate stateNode in appendAllChildren

We can't mutate the stateNode in appendAllChildren because the children
could be current.

This is a bit weird because now the child that we append is different
from the one on the fiber stateNode. I think this makes conceptual
sense, but I suspect this likely breaks an assumption in Fabric.

With this approach, we no longer need to clone to unhide the children,
so I removed those host config methods.

Fixes bug surfaced by fuzz tester. (The test case that failed was the
one that's already hard coded.)

* In persistent mode, disable test that reads a ref

Refs behave differently in persistent mode. I added a TODO to write
a persistent mode version of this test.

* Run persistent mode tests in CI

* test-persistent should skip files without noop

If a file doesn't reference react-noop-renderer, we shouldn't bother
running it in persistent mode, since the results will be identical to
the normal test run.

* Remove module constructor from placeholder tests

We don't need this now that we have the ability to run any test file in
either mutation or persistent mode.

* Revert "test-persistent should skip files without noop"

Seb objected to adding shelljs as a dep and I'm too lazy to worry about
Windows support so whatever I'll just revert this.

* Delete duplicate file
Browse files
Changed paths12 files
First-parent comparison
M package.json ModifiedM packages/react-native-renderer/src/ReactFabricHostConfig.js ModifiedM packages/react-noop-renderer/src/createReactNoop.js ModifiedM packages/react-reconciler/src/ReactFiberCompleteWork.js ModifiedM packages/react-reconciler/src/__tests__/ReactSuspenseFuzz-test.internal.js ModifiedM packages/react-reconciler/src/__tests__/ReactSuspensePlaceholder-test.internal.js ModifiedM packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.internal.js ModifiedM packages/react-reconciler/src/forks/ReactFiberHostConfig.custom.js ModifiedM packages/shared/HostConfigWithNoPersistence.js ModifiedM scripts/circleci/test_entry_point.sh ModifiedA scripts/jest/config.source-persistent.js AddedA scripts/jest/setupTests.persistent.js Added
Patch

Files changed

Rendering syntax-highlighted changes…