diff --git a/test/mocks/netMock.js b/test/mocks/netMock.js index b8cd3a6..70a4a8a 100644 --- a/test/mocks/netMock.js +++ b/test/mocks/netMock.js @@ -15,12 +15,17 @@ class Socket extends EventEmitter { } } + setNoDelay(noDelay) { + return this; + } + end() { this.emit("close", false); } write(data) { this._data = data; + return true; } receive(buffer) { @@ -55,6 +60,6 @@ class Server extends EventEmitter { exports.Server = Server; -exports.createServer = function(options, connectionListener) { +exports.createServer = function (options, connectionListener) { return new Server(options, connectionListener); };