Builds a fast-check tuple filter that rejects assertion-argument tuples for
which the assertion actually passes.
"Invalid" generators commonly build [subject, phrase, ...params] tuples by
generating the subject and params independently, assuming the result won't
satisfy the assertion. That assumption breaks for subset-style assertions
such as to satisfy/to be like: a superset subject legitimately passes,
and fast-check's shrinker actively drives generated values toward that
overlap (e.g. collapsing both sides to { '': null }). Filtering with this
guard keeps an "invalid" generator's outputs genuinely invalid.
The returned predicate invokes expectFn once per generated (and shrunk)
tuple, so pass the same bound expect the assertion is tested with. Because
fc.Arbitrary.filter is synchronous, this guard only supports synchronous
assertions.
Builds a fast-check tuple filter that rejects assertion-argument tuples for which the assertion actually passes.
"Invalid" generators commonly build
[subject, phrase, ...params]tuples by generating the subject and params independently, assuming the result won't satisfy the assertion. That assumption breaks for subset-style assertions such asto satisfy/to be like: a superset subject legitimately passes, and fast-check's shrinker actively drives generated values toward that overlap (e.g. collapsing both sides to{ '': null }). Filtering with this guard keeps an "invalid" generator's outputs genuinely invalid.The returned predicate invokes
expectFnonce per generated (and shrunk) tuple, so pass the same boundexpectthe assertion is tested with. Becausefc.Arbitrary.filteris synchronous, this guard only supports synchronous assertions.