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

    Type Alias DepthContext

    Instance of depth, can be used to alter the depth perceived by an arbitrary or to bias your own arbitraries based on the current depth

    Since 2.25.0

    type DepthContext = {
        depth: number;
    }
    Index

    Properties

    Properties

    depth: number

    Current depth (starts at 0, continues with 1, 2...). Only made of integer values superior or equal to 0.

    Remark: Whenever altering the depth during a generate, please make sure to ALWAYS reset it to its original value before you leave the generate. Otherwise the execution will imply side-effects that will potentially impact the following runs and make replay of the issue barely impossible.