• Create a Juju connection with the given options and provide it to the given callback. When logging in, the simulated server side automatically returns the appropriate response.

    Parameters

    • options: ConnectOptions

      The connect options.

    • loginResponse: Partial<{
          controller-tag: string;
          facades: {
              name: string;
              versions: number[];
          }[];
          model-tag: string;
          server-version: string;
          user-info: {
              controller-access: string;
              credentials: string;
              display-name: string;
              identity: string;
              last-connection: string;
              model-access: string;
          };
      }>

      The response to be returned during the juju login over the websocket. The object value provided here will be merged with the default response allowing you to provide custom values for top level keys like 'facades'.

    • callback: ((conn: undefined | Connection, ws: MockWebSocket) => void)

      Called when the connection is ready passing the connection itself and the WebSocket instance.

    Returns void

Generated using TypeDoc