From c1a94176a8a5bb247625cb8d89c99796d48a0da7 Mon Sep 17 00:00:00 2001 From: Eugene Zhdan Date: Sat, 13 Dec 2014 21:45:14 +0300 Subject: [PATCH] Fix variables scope in test --- test/lib-http-proxy-test.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/lib-http-proxy-test.js b/test/lib-http-proxy-test.js index 830ccae6e..525230058 100644 --- a/test/lib-http-proxy-test.js +++ b/test/lib-http-proxy-test.js @@ -337,14 +337,15 @@ describe('lib/http-proxy.js', function() { }); it('should proxy a socket.io stream', function (done) { - var ports = { source: gen.port, proxy: gen.port }; - var proxy = httpProxy.createProxyServer({ + var ports = { source: gen.port, proxy: gen.port }, + proxy = httpProxy.createProxyServer({ target: 'ws://127.0.0.1:' + ports.source, ws: true - }); - proxyServer = proxy.listen(ports.proxy); - var server = http.createServer(); + }), + proxyServer = proxy.listen(ports.proxy), + server = http.createServer(), destiny = io.listen(server); + function startSocketIo() { var client = ioClient.connect('ws://127.0.0.1:' + ports.proxy);