How to use the rsp-client.RSPClient.prototype function in rsp-client

To help you get started, we’ve selected a few rsp-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github redhat-developer / vscode-rsp-ui / test / clientstubs.ts View on Github external
constructor(sandbox: sinon.SinonSandbox) {
        this.clientStub = sandbox.stub(RSPClient.prototype);
        this.clientStub.connect.resolves();

        this.outgoing = sandbox.createStubInstance(Outgoing);
        this.clientStub.getOutgoingHandler.returns(this.outgoing as unknown as Outgoing);

        this.outgoingSync = sandbox.createStubInstance(OutgoingSynchronous);
        this.clientStub.getOutgoingSyncHandler.returns(this.outgoingSync as unknown as OutgoingSynchronous);

        this.incoming = sandbox.createStubInstance(Incoming);
        this.clientStub.getIncomingHandler.returns(this.incoming as unknown as Incoming);

        this.serverCreation = sandbox.createStubInstance(ServerCreation);
        this.clientStub.getServerCreation.returns(this.serverCreation);
    }
}