dphfox / Fusion

A modern reactive UI library, built specifically for Roblox and Luau.
https://elttob.uk/Fusion/
MIT License
530 stars 91 forks source link

Standard set of reactive graph shapes for testing #327

Closed dphfox closed 2 months ago

dphfox commented 2 months ago

image

I propose that - going forward, unit tests use these standardised graph shapes for all unit tests related to reactive graph update propagation. These should reflect a nice variety of graph shapes that can exhibit interesting behaviours, such as unequal path lengths, cycles, dependency diamonds, multiple sources/outputs, and transitive dependencies.

dphfox commented 2 months ago

These are now used as the test cases in the property testing framework for graph objects implemented in push-pull-execution. With the current set of property tests for tryInvalidate and tryRevalidate, that means there's now 236 generated tests, which is 1.7x more than the rest of Fusion's tests combined (137, which were all handwritten!)