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

    Interface IRawProperty<Ts, IsAsync>

    Property

    A property is the combination of:

    • Arbitraries: how to generate the inputs for the algorithm
    • Predicate: how to confirm the algorithm succeeded?

    Since 1.19.0

    interface IRawProperty<Ts, IsAsync extends boolean = boolean> {
        runAfterEach: () => | (IsAsync extends true ? Promise<void> : never)
        | (IsAsync extends false ? void : never);
        runBeforeEach: () => | (IsAsync extends true ? Promise<void> : never)
        | (IsAsync extends false ? void : never);
        generate(mrng: Random, runId?: number): Value<Ts>;
        isAsync(): IsAsync;
        run(
            v: Ts,
        ):
            | (
                IsAsync extends true
                    ? Promise<null | PreconditionFailure | PropertyFailure>
                    : never
            )
            | (
                IsAsync extends false
                    ? null
                    | PreconditionFailure
                    | PropertyFailure
                    : never
            );
        shrink(value: Value<Ts>): Stream<Value<Ts>>;
    }

    Type Parameters

    • Ts
    • IsAsync extends boolean = boolean

    Hierarchy (View Summary)

    Index

    Properties

    runAfterEach: () => | (IsAsync extends true ? Promise<void> : never)
    | (IsAsync extends false ? void : never)

    Run after each hook

    Since 3.4.0

    runBeforeEach: () => | (IsAsync extends true ? Promise<void> : never)
    | (IsAsync extends false ? void : never)

    Run before each hook

    Since 3.4.0

    Methods