mock-socket
mock-socket copied to clipboard
Question: simulate delay of connected
I would like to test that my client
will not send data to the server until it opens. Is there a way to sequence attemptConnection
-> open
-> send
on the Server
? Then I can I have my client
attempt to send data in-between attemptConnection
and open
and see if it gracefully handles a pending connection. Or less ideally, slip a delay somewhere?
Note, the event connection
is not what I'm looking for. I'm trying to test behavior before a connection is established, not after.