|
|
@ -23,13 +23,16 @@ describe('Connection', function() { |
|
|
|
var c = new Connection(mSocket, mPeer); |
|
|
|
should.exist(c); |
|
|
|
}); |
|
|
|
it('should create a proxied socket if instructed', function() { |
|
|
|
var mPeer; |
|
|
|
var c = new Connection(null, mPeer, { |
|
|
|
proxy: { host: 'localhost', port: 9050 } |
|
|
|
|
|
|
|
if (typeof process !== 'undefined' && process.versions) { //node-only tests
|
|
|
|
it('should create a proxied socket if instructed', function() { |
|
|
|
var mPeer; |
|
|
|
var c = new Connection(null, mPeer, { |
|
|
|
proxy: { host: 'localhost', port: 9050 } |
|
|
|
}); |
|
|
|
should.exist(c.socket); |
|
|
|
}); |
|
|
|
should.exist(c.socket); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|