settings: fix tests
This commit is contained in:
parent
89c74aa6e4
commit
63423d92ed
2 changed files with 6 additions and 3 deletions
|
|
@ -11,10 +11,11 @@ var io = require('socket.io-client');
|
||||||
var preconditions = require('preconditions').singleton();
|
var preconditions = require('preconditions').singleton();
|
||||||
|
|
||||||
function Network(opts) {
|
function Network(opts) {
|
||||||
var self = this;
|
preconditions.checkArgument(opts);
|
||||||
|
preconditions.checkArgument(opts.url);
|
||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
this.maxPeers = opts.maxPeers || 12;
|
this.maxPeers = opts.maxPeers || 12;
|
||||||
this.url = opts.url || 'http//localhost:30001';
|
this.url = opts.url;
|
||||||
this.secretNumber = opts.secretNumber;
|
this.secretNumber = opts.secretNumber;
|
||||||
this.cleanUp();
|
this.cleanUp();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,9 @@ describe('Network / Async', function() {
|
||||||
|
|
||||||
|
|
||||||
var createN = function(pk) {
|
var createN = function(pk) {
|
||||||
var n = new Async();
|
var n = new Async({
|
||||||
|
url: 'http://insight.example.com:1234'
|
||||||
|
});
|
||||||
var fakeSocket = {};
|
var fakeSocket = {};
|
||||||
fakeSocket.emit = function() {};
|
fakeSocket.emit = function() {};
|
||||||
fakeSocket.on = function() {};
|
fakeSocket.on = function() {};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue