You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 to fc.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:
Option 1: Provide something like buildStoppeable.
Option 2: Connect it directly in 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:
Same policy as fc.pre: it should rely on the very same configuration (to be confirmed).
Should not destroy performance
Should not tied arbitraries with properties too deeply
Should be reported properly
The text was updated successfully, but these errors were encountered:
💡 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: