moll / node-mitm

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
637 stars 48 forks source link

Add EventEmitter.prototype.listenerCount #78

Closed LoneRifle closed 1 year ago

LoneRifle commented 1 year ago

Node.js calls listenerCount() in the course of upgrading http connections to websockets, so add this from EventEmitter to the Mitm prototype

LoneRifle commented 1 year ago

Not needed anymore; realised that I was incorrectly using node-mitm that led to the creation of this PR.