How to write test case in mocha for getting response with enabled web socket?

I am writing test cases in mocha. I have one page to test where all data is coming from websocket. I am trying to connect with that page by creating web socket. But I am not getting any success.

Process: I am hitting one url to get updated data via socket. I am sending some data with that request like SID and other request params. Then I am getting response from socket as showing in below image.

Any help on this would be appreciated.

enter image description here