UNPKG

siesta-lite

Version:

Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers

39 lines (25 loc) 869 B
//--------------------------------------------------------------------------------- export enum NodeJsIpcRpc { FunctionCall } //--------------------------------------------------------------------------------- export class NodeJsPageRpcFunctionCall { type : NodeJsIpcRpc = NodeJsIpcRpc.FunctionCall func : (...args) => any | string args : any[] constructor (config : Partial<NodeJsPageRpcFunctionCall>) { Object.assign(this, config) } toJson () : object { let json : any = { type : this.type, func : this.func.toString() } if (this.args) json.args = this.args return json } } //--------------------------------------------------------------------------------- export enum NodeJsIpcClienState { Ready = "CLIENT_READY" }