@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Function checkPresenceWhileDisconnected

    • Check the "PRESENCE WHILE DISCONNECTED" rule of IProvider on a provider that is NOT connected (never started, or stopped): typing() (each state) and markRead() must resolve without contacting the transport. Give the provider a transport that fails when contacted (a fetch or socket that throws), so a call that reaches it rejects and is reported. Empty array = conforming; a provider without the methods has nothing to check.

      Parameters

      Returns Promise<CapabilityViolation[]>

      import { assertPresenceWhileDisconnected } from '@botmesh/core/testing'

      await assertPresenceWhileDisconnected(new MyProvider({ fetch: offlineFetch }), { chatId: '123' })