title: Integration testing a node.js socket.io server
body: <p>I'm trying to set up a server to respond to socket.io clients using nodejs, express and socket.io. I want to write tests to probe the server and make sure it's handling the events correctly and sending appropriate responses to the client.</p>
  
  <p>I tried writing some automated tests using jest but I couldn't figure out how to actually emit events to the server and have it respond.</p>
  
  <p><a href="https://stackoverflow.com/questions/15509231/unit-testing-node-js-and-websockets-socket-io">Unit testing Node.js and WebSockets (Socket.io)</a></p>
  
  <p>I checked out the above post but it didn't work for me...</p>