mirror of
https://github.com/http-party/node-http-proxy.git
synced 2026-02-01 17:46:18 +00:00
Merge pull request #752 from ezhdan-sugarcrm/tests-fix
Fix variables scope in test
This commit is contained in:
commit
f92a1b6839
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user