@salesforce/core
    Preparing search index...

    Class StreamingMockCometClient

    Simulates a comet client. To the core streaming client this mocks the internal comet impl. The uses setTimeout(0ms) event loop phase just so the client can simulate actual streaming without the response latency.

    Hierarchy (View Summary)

    Index
    • Fake handshake that invoke callback after the setTimeout event phase.

      Parameters

      • callback: () => void

        The function to invoke.

      Returns void

    • Fake subscription that completed after the setTimout event phase.

      Parameters

      • channel: string

        The streaming channel.

      • callback: (message: JsonMap) => void

        The function to invoke after the subscription completes.

      Returns CometSubscription