Skip to content

Is there a way to create an Arbitrary that's similar to using fc.gen()? #5022

Answered by dubzzz
skybrian asked this question in Q&A
Discussion options

You must be logged in to vote

The answer provided by @gruhn has the advantage to uncouple the generation of the entities from the one of the relationships without sacrificing shrinking capabilities (no chain nor gen: both helpers have been added to offer a simpler adoption but suffer from unsolvable limitations).

I guess you're implying there's aren't any interesting functions for constructing arbitraries that I missed?

I think no. More precisely so far, I believe I have no built-in provided such level of complexity. That's said the few manyToXxx suggested by @gruhn could possibly be a great starting point to have a fc.schema/database (not planned).

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@skybrian
Comment options

@gruhn
Comment options

@dubzzz
Comment options

Answer selected by skybrian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants