Interface for synchronous property defining hooks, see IProperty

Remarks

Since 2.2.0

interface IPropertyWithHooks<Ts> {
    runAfterEach?: (() => void);
    runBeforeEach?: (() => void);
    afterEach(invalidHookFunction): "afterEach expects a synchronous function but was given a function returning a Promise";
    afterEach(hookFunction): IPropertyWithHooks<Ts>;
    beforeEach(invalidHookFunction): "beforeEach expects a synchronous function but was given a function returning a Promise";
    beforeEach(hookFunction): IPropertyWithHooks<Ts>;
    generate(mrng, runId?): Value<Ts>;
    isAsync(): false;
    run(v, dontRunHook?): null | PreconditionFailure | PropertyFailure;
    shrink(value): Stream<Value<Ts>>;
}

Type Parameters

  • Ts

Hierarchy (view full)

Properties

runAfterEach?: (() => void)

Run after each hook

Type declaration

    • (): void
    • Returns void

Remarks

Since 3.4.0

runBeforeEach?: (() => void)

Run before each hook

Type declaration

    • (): void
    • Returns void

Remarks

Since 3.4.0

Methods