make Connection test only run in node

...since it doesn't make sense for the browser
This commit is contained in:
Ryan X. Charles 2014-04-17 15:07:19 -03:00
parent da7fede2c0
commit a1ef9c5220
1 changed files with 9 additions and 6 deletions

View File

@ -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);
});
};
});