mock-socket
mock-socket copied to clipboard
emit error message incorrect
If you try to call emit() on a Server before the connection is established, it throws an error saying 'SocketIO is already in CLOSING or CLOSED state'. It makes sense to throw an error, but the fact is that it's not actually in CLOSING or CLOSED state, it's in CONNECTING state. The error message should either state that it's in CONNECTING, CLOSING or CLOSED state, or, better yet, state what the actual state it's in is.