UNPKG

pusher-js-mock

Version:

Mock Pusher.js in your JavaScript tests with ease

24 lines (23 loc) 712 B
import PusherChannelMock from "./pusher-channel-mock"; import PusherMock from "./pusher-js-mock"; /** Interface for storing channels */ export interface IChannels { [name: string]: any; } declare class PusherMockInstance { channels: IChannels; connection: any; constructor(); /** * Get channel by its name. * @param {String} name - name of the channel. * @returns {PusherChannelMock} PusherChannelMock object that represents channel */ channel(name: string, client?: PusherMock): PusherChannelMock; /** * Resets the instance to a fresh state, i.e. no channels. */ reset(): void; } declare const _default: PusherMockInstance; export default _default;