fix test after rebase 2

This commit is contained in:
Manuel Araoz 2014-08-22 13:32:34 -04:00
parent 0d22524885
commit e00997bad8
3 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,7 @@ Network.prototype.cleanUp = function() {
this.copayerForPeer = {}; this.copayerForPeer = {};
this.connections = {}; this.connections = {};
this.criticalErr = ''; this.criticalErr = '';
this.removeAllListeners();
if (this.socket) { if (this.socket) {
this.socket.disconnect(); this.socket.disconnect();
this.socket = null; this.socket = null;

View File

@ -9,6 +9,7 @@ try {
} catch (e) { } catch (e) {
var copay = require('../copay'); //node var copay = require('../copay'); //node
} }
var Buffer = bitcore.Buffer;
var Insight = copay.Insight || require('../js/models/blockchain/Insight'); var Insight = copay.Insight || require('../js/models/blockchain/Insight');
var ID = '933bf321393459b7'; var ID = '933bf321393459b7';

View File

@ -17,6 +17,7 @@ describe('Network / Async', function() {
var fakeSocket = {}; var fakeSocket = {};
fakeSocket.emit = function() {}; fakeSocket.emit = function() {};
fakeSocket.on = function() {}; fakeSocket.on = function() {};
fakeSocket.disconnect = function() {};
n.createSocket = function() { n.createSocket = function() {
return fakeSocket; return fakeSocket;
}; };