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 full)



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


    • callback: (() => void)

      The function to invoke.

        • (): void
        • Returns void

    Returns void

  • Fake subscription that completed after the setTimout event phase.


    • channel: string

      The streaming channel.

    • callback: ((message) => void)

      The function to invoke after the subscription completes.

        • (message): void
        • Parameters

          • message: JsonMap

          Returns void

    Returns CometSubscription