aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-24 06:39:35 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-24 06:39:35 +0800
commit9f67974133ae26b37d388cf95c995f76c0ee650f (patch)
tree2fd39cb1b04ce08380d49eeaafa08bedfa47dfe2 /test
parentd9dc2eac6305abda8da1113f16868bd362283582 (diff)
downloadtangerine-wallet-browser-9f67974133ae26b37d388cf95c995f76c0ee650f.tar.gz
tangerine-wallet-browser-9f67974133ae26b37d388cf95c995f76c0ee650f.tar.zst
tangerine-wallet-browser-9f67974133ae26b37d388cf95c995f76c0ee650f.zip
Fix last async keyring test
Diffstat (limited to 'test')
-rw-r--r--test/unit/keyrings/hd-test.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/test/unit/keyrings/hd-test.js b/test/unit/keyrings/hd-test.js
index 2c984267e..2d9e0ffd9 100644
--- a/test/unit/keyrings/hd-test.js
+++ b/test/unit/keyrings/hd-test.js
@@ -57,24 +57,26 @@ describe('hd-keyring', function() {
describe('#deserialize a private key', function() {
it('serializes what it deserializes', function(done) {
+ console.log('deserializing ' + sampleMnemonic)
keyring.deserialize({
mnemonic: sampleMnemonic,
numberOfAccounts: 1
})
.then(() => {
+ console.dir(keyring)
assert.equal(keyring.wallets.length, 1, 'restores two accounts')
- keyring.addAccounts(1)
-
- const accounts = keyring.getAccounts()
+ return keyring.addAccounts(1)
+ }).then(() => {
+ return keyring.getAccounts()
+ }).then((accounts) => {
assert.equal(accounts[0], firstAcct)
assert.equal(accounts[1], secondAcct)
assert.equal(accounts.length, 2)
- keyring.serialize()
- .then((serialized) => {
- assert.equal(serialized.mnemonic, sampleMnemonic)
- done()
- })
+ return keyring.serialize()
+ }).then((serialized) => {
+ assert.equal(serialized.mnemonic, sampleMnemonic)
+ done()
})
})
})