diff --git a/test/Identity.js b/test/Identity.js index b75b42826..2e22a7c3d 100644 --- a/test/Identity.js +++ b/test/Identity.js @@ -235,6 +235,7 @@ describe('Identity model', function() { storage.getFirst = sinon.stub().yields(null, 'wallet1234'); var wallet = sinon.stub(); + wallet.netStart = sinon.stub(); wallet.store = sinon.stub().yields(null); Identity._walletRead = sinon.stub().callsArgWith(2, null, wallet); diff --git a/test/Profile.js b/test/Profile.js index 57bd623d2..fe243c1c2 100644 --- a/test/Profile.js +++ b/test/Profile.js @@ -112,10 +112,12 @@ describe('Profile model', function() { it('should list wallets in order', function(done) { var p = new Profile(opts, storage); p.addWallet('123', {}, function(err) { + setTimeout(function() { p.addWallet('234', {}, function(err) { - _.pluck(p.listWallets(), 'id').should.deep.equal(['123', '234']); + _.pluck(p.listWallets(), 'id').should.deep.equal(['234', '123']); done(); }) + },10); }); }); });