dillon1000/react
Commit
Browse files 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.
Changed paths3 files
First-parent comparisonsrc/renderers/noop/ReactNoop.js ModifiedA src/renderers/shared/fiber/__tests__/ReactIncrementalTriangle-test.js AddedM src/renderers/shared/fiber/__tests__/__snapshots__/ReactIncrementalPerf-test.js.snap ModifiedPatch
Files changed
Rendering syntax-highlighted changes…