core3-utils

@wixc3/wait-for-call on Github

Home > @wixc3/wait-for-call > createWaitForCall

createWaitForCall() function

Signature:

export declare function createWaitForCall<F extends (...args: any[]) => any>(name?: string, f?: F): {
    waitForCall: (cb: (...argsHistory: Parameters<F>[]) => void, message?: string) => Promise<void>;
    spy: sinon.SinonSpy<any[], any>;
    expectCall: (cb: (...argsHistory: Parameters<F>[]) => void, message?: string) => void;
};

Parameters

Parameter Type Description
name string _(Optional)_
f F _(Optional)_

Returns:

{ waitForCall: (cb: (…argsHistory: Parameters<F>[]) => void, message?: string) => Promise<void>; spy: sinon.SinonSpy<any[], any>; expectCall: (cb: (…argsHistory: Parameters<F>[]) => void, message?: string) => void; }