make Wallet tests work in mocha browser

This commit is contained in:
Ryan X. Charles 2014-06-15 21:19:21 -07:00
commit 46efea1243

View file

@ -81,7 +81,7 @@ describe('Wallet model', function() {
should.exist(w.privateKey);
should.exist(w.txProposals);
should.exist(w.netKey);
var b = new Buffer(w.netKey, 'base64');
var b = new bitcore.Buffer(w.netKey, 'base64');
b.toString('hex').length.should.equal(16);
});
@ -291,6 +291,7 @@ describe('Wallet model', function() {
});
it('call reconnect after interval', function(done) {
this.timeout(10000);
var w = createW2();
var testTime = 1000;
var callCount = 0;
@ -543,6 +544,7 @@ describe('Wallet model', function() {
});
});
it('should create & sign transaction from received funds', function(done) {
this.timeout(10000);
var w = createW2();
var pk = w.privateKey;
w.privateKey = null;