Interface for asynchronous property defining hooks, see IAsyncProperty

Since 2.2.0

interface IAsyncPropertyWithHooks<Ts> {
    runAfterEach?: (() => Promise<void>);
    runBeforeEach?: (() => Promise<void>);
    afterEach(hookFunction: AsyncPropertyHookFunction): IAsyncPropertyWithHooks<Ts>;
    beforeEach(hookFunction: AsyncPropertyHookFunction): IAsyncPropertyWithHooks<Ts>;
    generate(mrng: Random, runId?: number): Value<Ts>;
    isAsync(): true;
    run(v: Ts, dontRunHook?: boolean): Promise<null | PreconditionFailure | PropertyFailure>;
    shrink(value: Value<Ts>): Stream<Value<Ts>>;
}

Type Parameters

  • Ts

Hierarchy (view full)

Properties

runAfterEach?: (() => Promise<void>)

Run after each hook

Since 3.4.0

runBeforeEach?: (() => Promise<void>)

Run before each hook

Since 3.4.0

Methods