API Reference | fast-check | Property based testing framework
    Preparing search index...

    Type Alias EntityGraphContraints<TEntityFields>

    Constraints to be applied on entityGraph

    Since 4.5.0

    type EntityGraphContraints<TEntityFields> = {
        initialPoolConstraints?: {
            [EntityName in keyof TEntityFields]?: ArrayConstraints
        };
        noNullPrototype?: boolean;
        unicityConstraints?: {
            [EntityName in keyof TEntityFields]?: UniqueArrayConstraintsRecommended<
                TEntityFields[EntityName],
                unknown,
            >["selector"]
        };
    }

    Type Parameters

    • TEntityFields
    Index

    Properties

    initialPoolConstraints?: {
        [EntityName in keyof TEntityFields]?: ArrayConstraints
    }

    Customize how to select what should be part of the initial pool of entities. This pool is used as a starting point to ask and create for other entities.

    Unspecified entities take the defaults from array

    Since 4.5.0

    noNullPrototype?: boolean

    Do not generate records with null prototype

    false
    

    Since 4.5.0

    unicityConstraints?: {
        [EntityName in keyof TEntityFields]?: UniqueArrayConstraintsRecommended<
            TEntityFields[EntityName],
            unknown,
        >["selector"]
    }

    Unicity rules to be applied on a specific kind. The provided selector function will be leveraged to compare entities of a given kind. Two entities resulting on an equal output for Object.is will be considered equivalent and only one of them will be kept.

    All values are considered unique
    

    Since 4.5.0