Socket
Socket
Sign inDemoInstall

mitm

Package Overview
Dependencies
1
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.0 to 1.3.1

.editorconfig

6

CHANGELOG.md

@@ -0,3 +1,7 @@

## 1.3.1 (Sep 6, 2016)
- Fixes calling `Socket.prototype.ref` and `Socket.prototype.unref` on the returned client and server sockets.
Thanks, [Vincent Voyer](http://function.fr), for the help!
## 1.3.0 (Aug 17, 2016)
- Adds compatibility with Node v6.4.
- Adds compatibility with Node v6.4.
Thanks to [Andreas Lind](https://github.com/papandreou)!

@@ -4,0 +8,0 @@

@@ -63,2 +63,4 @@ var DuplexStream = require("stream").Duplex

InternalSocket.prototype._read = noop
InternalSocket.prototype.ref = noop
InternalSocket.prototype.unref = noop

@@ -65,0 +67,0 @@ InternalSocket.prototype._write = function(data, encoding, done) {

2

package.json
{
"name": "mitm",
"version": "1.3.0",
"version": "1.3.1",
"description": "Intercept and mock outgoing 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. Useful when testing code that hits remote servers.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -316,2 +316,26 @@ var _ = require("underscore")

})
describe(".prototype.ref", function() {
it("must allow calling on client", function() {
Net.connect({host: "foo"}).ref()
})
it("must allow calling on server", function() {
var server; this.mitm.on("connection", function(s) { server = s })
Net.connect({host: "foo"})
server.ref()
})
})
describe(".prototype.unref", function() {
it("must allow calling on client", function() {
Net.connect({host: "foo"}).unref()
})
it("must allow calling on server", function() {
var server; this.mitm.on("connection", function(s) { server = s })
Net.connect({host: "foo"})
server.unref()
})
})
})

@@ -318,0 +342,0 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc