Skip to content

Commit

Permalink
Merge pull request #752 from ezhdan-sugarcrm/tests-fix
Browse files Browse the repository at this point in the history
Fix variables scope in test
  • Loading branch information
indexzero committed Dec 13, 2014
2 parents 099eb86 + c1a9417 commit f92a1b6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/lib-http-proxy-test.js
Expand Up @@ -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);

Expand Down

0 comments on commit f92a1b6

Please sign in to comment.