Intercept and mock outgoing Node.js network TCP connections and HTTP requests for testing. Intercepts and gives you a Net.Socket, Http.IncomingMessage and Http.ServerResponse to test and respond with. Super useful when testing code that hits remote servers.
Other
640
stars
48
forks
source link
TypeError: server.listenerCount is not a function #82
node:_http_server:1033
server.listenerCount('upgrade') > 0;
^
TypeError: server.listenerCount is not a function
at parserOnIncoming (node:_http_server:1033:26)
at HTTPParser.parserOnHeadersComplete (node:_http_common:118:17)
at socketOnData (node:_http_server:823:22)
at TlsSocket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at InternalSocket.onStreamRead [as onread] (node:internal/stream_base_commons:191:23)
at InternalSocket.readData (/home/njentit/Developments/NODEJS/SHPxBOT/node_modules/mitm/lib/internal_socket.js:168:8)
at InternalSocket.emit (node:events:519:28)
node:_http_server:1033 server.listenerCount('upgrade') > 0; ^ TypeError: server.listenerCount is not a function at parserOnIncoming (node:_http_server:1033:26) at HTTPParser.parserOnHeadersComplete (node:_http_common:118:17) at socketOnData (node:_http_server:823:22) at TlsSocket.emit (node:events:519:28) at addChunk (node:internal/streams/readable:559:12) at readableAddChunkPushByteMode (node:internal/streams/readable:510:3) at Readable.push (node:internal/streams/readable:390:5) at InternalSocket.onStreamRead [as onread] (node:internal/stream_base_commons:191:23) at InternalSocket.readData (/home/njentit/Developments/NODEJS/SHPxBOT/node_modules/mitm/lib/internal_socket.js:168:8) at InternalSocket.emit (node:events:519:28)