Skip to content

Commit

Permalink
remove unused test internals
Browse files Browse the repository at this point in the history
  • Loading branch information
LiranCohen committed Feb 27, 2024
1 parent ad90dd2 commit 95bb520
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions tests/json-rpc-socket.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,5 @@ describe('JsonRpcSocket', () => {
expect(logMessage).to.equal('JSON RPC Socket close ws://127.0.0.1:9003');
});

xit('calls onerror handler', async () => {
const onErrorHandler = { onerror: ():void => {} };
const onErrorSpy = sinon.spy(onErrorHandler, 'onerror');

await JsonRpcSocket.connect('ws://127.0.0.1:9003', { onerror: onErrorHandler.onerror, connectTimeout: 1 });
// const serverSocket = [...wsServer.clients][0];
// serverSocket.emit('error', { type: 'error', target: null, message: 'unknown error' });

await new Promise((resolve) => setTimeout(resolve, 5)); // wait for close event to arrive
expect(onErrorSpy.callCount).to.equal(1, 'error');
});
xit('calls onerror handler', async () => {});
});

0 comments on commit 95bb520

Please sign in to comment.