From a1ef9c52205f4da58121d6fc6ca1c4aff0991e52 Mon Sep 17 00:00:00 2001 From: "Ryan X. Charles" Date: Thu, 17 Apr 2014 15:07:19 -0300 Subject: [PATCH] make Connection test only run in node ...since it doesn't make sense for the browser --- test/test.Connection.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test/test.Connection.js b/test/test.Connection.js index cbf98ce46..5b6379e11 100644 --- a/test/test.Connection.js +++ b/test/test.Connection.js @@ -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); - }); + }; });