Connect filter
to rejection mechanisms like fc.pre
does
#4660
Labels
💡 Idea to investigate
Non straightforward features that seems great but need to be assessed and designed carefully.
💡 Idea
Provide a built-in way to work with infinite loops in
filter
.Motivation
On its own
filter
might easily lead to infinite loops when predicates are wrongly defined. Contrary tofc.pre
it does not stop itself from running when it reached to many tries to generate something.As reported in #4659, it could be great to have something for
filter
.Example
Here are some possible options that came to my mind:
buildStoppeable
.Arbitrary.prototype.filter
(we have to measure the performance cost if we go in that direction).Whatever the option it could be great to have the following:
fc.pre
: it should rely on the very same configuration (to be confirmed).The text was updated successfully, but these errors were encountered: