dillon1000/react

Commit

Fuzz tester that simulates Sierpinski Triangle demo (#9952)

* Add ReactNoop.yield, ReactNoop.flushAndYield, ReactNoop.flushUnitsOfWork

Incremental tests often rely on yielding at a specific point. Using an
explicit API should make our tests more resilient to changes
in implementation.

* Fuzz tester that simulates Sierpinski Triangle demo

The tests only assert that the output of the tree is consistent after
each action, and that the final result after all work has flushed is
the expected value. It does not assert how work is reused, which means
it can't detect starvation issues. However, this also means that it
is fairly resilient to changes in our incremental algorithm.
Browse files
Changed paths3 files
First-parent comparison
M src/renderers/noop/ReactNoop.js ModifiedA src/renderers/shared/fiber/__tests__/ReactIncrementalTriangle-test.js AddedM src/renderers/shared/fiber/__tests__/__snapshots__/ReactIncrementalPerf-test.js.snap Modified
Patch

Files changed

Rendering syntax-highlighted changes…