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

    Interface JsonSharedConstraints

    Shared constraints for:

    Since 2.5.0

    interface JsonSharedConstraints {
        depthSize?: DepthSize;
        maxDepth?: number;
        noUnicodeString?: boolean;
        stringUnit?:
            | Arbitrary<string>
            | "grapheme"
            | "binary"
            | "grapheme-composite"
            | "grapheme-ascii"
            | "binary-ascii";
    }
    Index

    Properties

    depthSize?: DepthSize

    Limit the depth of the object by increasing the probability to generate simple values (defined via values) as we go deeper in the object.

    Since 2.20.0

    maxDepth?: number

    Maximal depth allowed

    Number.POSITIVE_INFINITY — defaulting seen as "max non specified" when defaultSizeToMaxWhenMaxSpecified=true

    Since 2.5.0

    noUnicodeString?: boolean

    Only generate instances having keys and values made of ascii strings (when true)

    Prefer using stringUnit to customize the kind of strings that will be generated by default.

    true
    

    Since 3.19.0

    stringUnit?:
        | Arbitrary<string>
        | "grapheme"
        | "binary"
        | "grapheme-composite"
        | "grapheme-ascii"
        | "binary-ascii"

    Replace the default unit for strings.

    undefined
    

    Since 3.23.0