From 1b6479c3209ab4af2be1a072c7d4e00995db8c43 Mon Sep 17 00:00:00 2001 From: Sebastian Scholz Date: Tue, 3 Sep 2024 17:13:33 +0200 Subject: [PATCH] Fix tests --- test/mocks/netMock.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); };