mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
Fix variables scope in test
This commit is contained in:
parent
099eb86948
commit
c1a94176a8
@ -337,14 +337,15 @@ describe('lib/http-proxy.js', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should proxy a socket.io stream', function (done) {
|
it('should proxy a socket.io stream', function (done) {
|
||||||
var ports = { source: gen.port, proxy: gen.port };
|
var ports = { source: gen.port, proxy: gen.port },
|
||||||
var proxy = httpProxy.createProxyServer({
|
proxy = httpProxy.createProxyServer({
|
||||||
target: 'ws://127.0.0.1:' + ports.source,
|
target: 'ws://127.0.0.1:' + ports.source,
|
||||||
ws: true
|
ws: true
|
||||||
});
|
}),
|
||||||
proxyServer = proxy.listen(ports.proxy);
|
proxyServer = proxy.listen(ports.proxy),
|
||||||
var server = http.createServer();
|
server = http.createServer(),
|
||||||
destiny = io.listen(server);
|
destiny = io.listen(server);
|
||||||
|
|
||||||
function startSocketIo() {
|
function startSocketIo() {
|
||||||
var client = ioClient.connect('ws://127.0.0.1:' + ports.proxy);
|
var client = ioClient.connect('ws://127.0.0.1:' + ports.proxy);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user