From 63423d92ed12546a2fa978c3dd6412da01f7dbd5 Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Thu, 11 Sep 2014 10:15:00 -0700 Subject: [PATCH] settings: fix tests --- js/models/network/Async.js | 5 +++-- test/test.network.Async.js | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/js/models/network/Async.js b/js/models/network/Async.js index 869591afe..a2ca61017 100644 --- a/js/models/network/Async.js +++ b/js/models/network/Async.js @@ -11,10 +11,11 @@ var io = require('socket.io-client'); var preconditions = require('preconditions').singleton(); function Network(opts) { - var self = this; + preconditions.checkArgument(opts); + preconditions.checkArgument(opts.url); opts = opts || {}; this.maxPeers = opts.maxPeers || 12; - this.url = opts.url || 'http//localhost:30001'; + this.url = opts.url; this.secretNumber = opts.secretNumber; this.cleanUp(); } diff --git a/test/test.network.Async.js b/test/test.network.Async.js index 7de41751f..b7097c61f 100644 --- a/test/test.network.Async.js +++ b/test/test.network.Async.js @@ -13,7 +13,9 @@ describe('Network / Async', function() { var createN = function(pk) { - var n = new Async(); + var n = new Async({ + url: 'http://insight.example.com:1234' + }); var fakeSocket = {}; fakeSocket.emit = function() {}; fakeSocket.on = function() {};