Documentation
    Preparing search index...

    Function pushThrough

    • Deliver an envelope through a caller-supplied send and record it in mock.sent. Use it when the push belongs to an earlier request whose runtime callback already carries the right lifecycle checks, such as relay.event for a live relay.subscribe, exactly as the reference services do.

      Parameters

      • service: MockService

        A mock from defineMockService.

      • windowId: string

        Recipient window (for the sent record).

      • message: NappletMessage

        Envelope to deliver.

      • send: (msg: NappletMessage) => void

        The request callback to deliver through.

      Returns boolean

      false when service was not built by defineMockService.

      pushThrough(relay, sub.windowId, { type: 'relay.event', subId: sub.subId, result } as NappletMessage, sub.send);