mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[fix test] handle proxy error since we are properly aborting the proxy Request
This commit is contained in:
parent
77a1cff9bc
commit
61c8734e8b
@ -159,6 +159,11 @@ describe('lib/http-proxy.js', function() {
|
|||||||
timeout: 3
|
timeout: 3
|
||||||
}).listen(ports.proxy);
|
}).listen(ports.proxy);
|
||||||
|
|
||||||
|
proxy.on('error', function (e) {
|
||||||
|
expect(e).to.be.an(Error);
|
||||||
|
expect(e.code).to.be.eql('ECONNRESET');
|
||||||
|
});
|
||||||
|
|
||||||
var source = http.createServer(function(req, res) {
|
var source = http.createServer(function(req, res) {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
res.end('At this point the socket should be closed');
|
res.end('At this point the socket should be closed');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user