Closed ggrossetie closed 2 years ago
I don't know how to add a unit test without exporting the socket object (i.e., public accessor) to make sure that the socket was destroyed when the writable stream is closed.
Alternatively, I can add a new option onSocketDestroyed
(callback function) called after socket.destroy
?
Thoughts?
Export the socket.
Unit test added!
Not sure how to test but
close
is not a valid option: https://nodejs.org/api/stream.html#new-streamreadableoptionsresolves #38