Skip to content

Commit f92a1b6

Browse files
committed
Merge pull request #752 from ezhdan-sugarcrm/tests-fix
Fix variables scope in test
2 parents 099eb86 + c1a9417 commit f92a1b6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/lib-http-proxy-test.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -337,14 +337,15 @@ describe('lib/http-proxy.js', function() {
337337
});
338338

339339
it('should proxy a socket.io stream', function (done) {
340-
var ports = { source: gen.port, proxy: gen.port };
341-
var proxy = httpProxy.createProxyServer({
340+
var ports = { source: gen.port, proxy: gen.port },
341+
proxy = httpProxy.createProxyServer({
342342
target: 'ws://127.0.0.1:' + ports.source,
343343
ws: true
344-
});
345-
proxyServer = proxy.listen(ports.proxy);
346-
var server = http.createServer();
344+
}),
345+
proxyServer = proxy.listen(ports.proxy),
346+
server = http.createServer(),
347347
destiny = io.listen(server);
348+
348349
function startSocketIo() {
349350
var client = ioClient.connect('ws://127.0.0.1:' + ports.proxy);
350351

0 commit comments

Comments
 (0)