get function name change

This commit is contained in:
Wise Colt
2020-03-28 03:15:21 +03:00
parent fba7b9bf01
commit 2d8a42e5fd
4896 changed files with 515350 additions and 8 deletions

View File

@@ -0,0 +1,22 @@
/*
Default net connect.
Mock the same hostname:port, different path.
Result: Nock does not allow request to proceed.
*/
var log = require('./_log');
var events = ['socket', 'response', 'end', 'data', 'error'];
var nock = require('../');
nock('http://example.com').get('/path').reply(200, 'whaaa');
var http = require('http');
var req = http.get('http://example.com/other-path');
req.once('error', function(err) {
console.log(err.stack);
});
events.forEach(log(req, 'req'));