Skip to main content

Function: skipEqualValues()

skipEqualValues(): Plugin<unknown>

Defined in: packages/fast-check/src/check/plugin/EqualValuesPlugins.ts:93

Never execute the predicate twice on the same value.

A duplicated run whose first execution succeeded is marked as skipped instead of successful. If too many runs get skipped the run will be marked as failed.

Close to ignoreEqualValues except we skip runs having the same value.

WARNING: Detecting equal values is based on stringifying them. It may result in false positives and false negatives.

Returns

Plugin<unknown>

Example

fc.assert(
fc.property(..., (...) => {...}),
{ plugins: [fc.skipEqualValues()] }
)

Remarks

Since 4.10.0