Thus far, the client end of the socket is the only piece of client state tracked in tests, for which a global socket variable has been used. In preparation to add more state, replace the socket global with a client global object that groups all client state.
Thus far, the client end of the socket is the only piece of client state tracked in tests, for which a global
socket
variable has been used. In preparation to add more state, replace thesocket
global with aclient
global object that groups all client state.