fast-check
fast-check copied to clipboard
Provide a built-in way to generate set of entities having relationships between each others
💡 Idea
Generating structures being tied to one another in a many-to-many or one-to-many relationship in fast-check is not trivial. While feasible it requires our users to come up with advanced and complex options. The two tickets below are asking for it:
- https://github.com/dubzzz/fast-check/discussions/5022
- https://github.com/dubzzz/fast-check/discussions/5023
As the case is pretty general, we should probably come up with a built-in utility hiding all this complexity and able to generate a simple database content based on a provided schema. The helpers for many-to-many and many-to-one initiated by @gruhn sounds like great ideas to start to think of it.
Disclaimer: while the issue has been opened, there is no certainty that there will be a built-in helpers for that purpose, but at least we can start thinking of it: api, implem...