pusher-js-mock
Version:
Mock Pusher.js in your JavaScript tests with ease
23 lines (22 loc) • 643 B
TypeScript
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): any;
/**
* Resets the instance to a fresh state, i.e. no channels.
*/
reset(): void;
}
declare const _default: PusherMockInstance;
export default _default;