intern
Version:
Intern. A next-generation code testing stack for JavaScript.
29 lines (28 loc) • 828 B
TypeScript
import { CancellablePromise } from '@theintern/common';
import { RemoteEvents } from '../RemoteSuite';
export default abstract class BaseChannel {
readonly url: string;
readonly sessionId: string;
constructor(options: ChannelOptions);
sendMessage(name: keyof RemoteEvents, data: any): CancellablePromise<any>;
protected abstract _sendData(name: keyof RemoteEvents, data: any): CancellablePromise<any>;
}
export interface ChannelOptions {
sessionId: string;
url: string;
port?: number;
timeout?: number;
}
export declare function isChannel(value: any): value is BaseChannel;
export interface ChannelOptions {
sessionId: string;
url: string;
port?: number;
timeout?: number;
}
export interface Message {
sessionId: string;
id: string;
name: string;
data: any;
}