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,6 +23,8 @@ describe('Connection', function() {
var c = new Connection(mSocket, mPeer);
should.exist(c);
});
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, {
@ -30,6 +32,7 @@ describe('Connection', function() {
});
should.exist(c.socket);
});
};
});