• A factory to create a generic mocked HTTP server for testing purposes

    Returns

    Object exposing close mock callback and server url

    Parameters

    • listenerGenerator: ListenerGenerator

      Custom listener needed to instantiate the server

    • Optional serverPort: number

      Optional server port

    Returns ((handler?: MockHandler) => Promise<{
        closeMock: (() => Promise<void>);
        serverUrl: string;
    }>)

      • (handler?: MockHandler): Promise<{
            closeMock: (() => Promise<void>);
            serverUrl: string;
        }>
      • Parameters

        Returns Promise<{
            closeMock: (() => Promise<void>);
            serverUrl: string;
        }>

Generated using TypeDoc