Options
All
  • Public
  • Public/Protected
  • All
Menu

Class representing fake Pusher Client.

Hierarchy

  • PusherMock

Index

Constructors

constructor

Properties

channel

channel: channel = PusherMockInstance.channel

channels

channels: IChannels = PusherMockInstance.channels

clientKey

clientKey: string | undefined

config

config: IPusherMockOptions | undefined

connection

connection: any = PusherMockInstance.connection

id

id: string | undefined = undefined

info

info: Record<string, any> | undefined = undefined

Methods

allChannels

  • allChannels(): any[]

bind

  • bind(name: string, callback: function): void
  • Bind a callback to an event on all channels

    Parameters

    • name: string

      name of the event to bind to.

    • callback: function

      callback to be called on event.

        • (): void
        • Returns void

    Returns void

setAuthInfo

  • setAuthInfo(errored: boolean, auth: any): void

subscribe

  • subscribe(name: string): any
  • Mock subscribing to a channel.

    Parameters

    • name: string

      name of the channel.

    Returns any

    PusherChannelMock object that represents channel

unbind

  • unbind(name: string, callback: function): void
  • Unbind a callback from an event on all channels

    Parameters

    • name: string

      name of the event to unbind from.

    • callback: function

      callback to be called on event.

        • (): void
        • Returns void

    Returns void

unsubscribe

  • unsubscribe(name: string): void
  • Unsubscribe from a mocked channel.

    Parameters

    • name: string

      name of the channel.

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc