Comparing version
@@ -70,2 +70,4 @@ var EventEmitter = require('events').EventEmitter, | ||
req.path = options.path; | ||
options.getHeader = function(name) { | ||
@@ -72,0 +74,0 @@ return getHeader(req, name); |
{ "name" : "nock" | ||
, "description" : "HTTP Server mocking for Node.js" | ||
, "tags" : ["Mock", "HTTP", "testing", "isolation"] | ||
, "version" : "0.13.4" | ||
, "version" : "0.13.5" | ||
, "author" : "Pedro Teixeira <pedro.teixeira@gmail.com>" | ||
@@ -6,0 +6,0 @@ , "contributors" : |
@@ -1497,4 +1497,3 @@ var nock = require('../.') | ||
.post('/claim', {some_data: "something"}) | ||
.reply(200) | ||
.log(console.log); | ||
.reply(200); | ||
@@ -1512,1 +1511,20 @@ http.request({ | ||
}); | ||
tap.test('request has path', function(t) { | ||
var scope = nock('http://haspath.com') | ||
.get('/the/path/to/infinity') | ||
.reply(200); | ||
var req = http.request({ | ||
hostname: 'haspath.com', | ||
port: 80, | ||
method: "GET", | ||
path: '/the/path/to/infinity' | ||
}, function(res) { | ||
scope.done(); | ||
t.equal(req.path, '/the/path/to/infinity', 'should have req.path set to /the/path/to/infinity'); | ||
t.end(); | ||
}); | ||
req.end(); | ||
}); |
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
67247
0.68%1947
0.83%0
-100%