Last active
August 29, 2015 14:18
-
-
Save shannonmoeller/b6b2fab1f8dd2ec42d89 to your computer and use it in GitHub Desktop.
Mock Socket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var es = require('event-stream'), | |
reader = es.readArray([mockDataIn]), | |
writer = es.writeArray(function (err, mockDataOut){ | |
assert(mockDataOut); | |
}), | |
mockSocket = es.duplex(writer, reader); | |
mockSocket.pipe(...).pipe(mockSocket); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment