aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-09-11 03:15:05 +0800
committerDan Finlay <dan@danfinlay.com>2016-09-11 03:15:05 +0800
commit1b77d5300b1ace16f96cf626d69925a26b5f0d29 (patch)
tree965c0a36c62feb42afc6fb8bb4a488cc007e1646 /test
parent59fd86383fbf379724c3bcca6da9d5a6192bbcf2 (diff)
downloadtangerine-wallet-browser-1b77d5300b1ace16f96cf626d69925a26b5f0d29.tar
tangerine-wallet-browser-1b77d5300b1ace16f96cf626d69925a26b5f0d29.tar.gz
tangerine-wallet-browser-1b77d5300b1ace16f96cf626d69925a26b5f0d29.tar.bz2
tangerine-wallet-browser-1b77d5300b1ace16f96cf626d69925a26b5f0d29.tar.lz
tangerine-wallet-browser-1b77d5300b1ace16f96cf626d69925a26b5f0d29.tar.xz
tangerine-wallet-browser-1b77d5300b1ace16f96cf626d69925a26b5f0d29.tar.zst
tangerine-wallet-browser-1b77d5300b1ace16f96cf626d69925a26b5f0d29.zip
Clean up tests
Diffstat (limited to 'test')
-rw-r--r--test/unit/idStore-test.js35
1 files changed, 17 insertions, 18 deletions
diff --git a/test/unit/idStore-test.js b/test/unit/idStore-test.js
index 422db6f7b..1028e35ea 100644
--- a/test/unit/idStore-test.js
+++ b/test/unit/idStore-test.js
@@ -59,12 +59,7 @@ describe('IdentityStore', function() {
})
describe('#recoverFromSeed BIP44 compliance', function() {
- let seedWords = 'picnic injury awful upper eagle junk alert toss flower renew silly vague'
- let firstAccount = '0x5d8de92c205279c10e5669f797b853ccef4f739a'
- const salt = 'lightwalletSalt'
-
- const secondSeed = 'radar blur cabbage chef fix engine embark joy scheme fiction master release'
- const secondAcct = '0xac39b311dceb2a4b2f5d8461c1cdaf756f4f7ae9'
+ const salt = 'lightwalletSalt'
let password = 'secret!'
let accounts = []
@@ -86,31 +81,35 @@ describe('IdentityStore', function() {
})
it('should return the expected first account', function (done) {
+ let seedWords = 'picnic injury awful upper eagle junk alert toss flower renew silly vague'
+ let firstAccount = '0x5d8de92c205279c10e5669f797b853ccef4f739a'
idStore.recoverFromSeed(password, seedWords, (err) => {
assert.ifError(err)
- let newKeystore = idStore._idmgmt.keyStore
-
assert.equal(accounts[0], firstAccount)
-
- accounts = []
- idStore.recoverFromSeed(password, secondSeed, (err) => {
-
- let accounts = idStore._getAddresses()
- assert.equal(accounts[0], secondAcct)
- done()
- })
+ done()
})
})
it('should return the expected second account', function (done) {
+ const secondSeed = 'radar blur cabbage chef fix engine embark joy scheme fiction master release'
+ const secondAcct = '0xac39b311dceb2a4b2f5d8461c1cdaf756f4f7ae9'
+
idStore.recoverFromSeed(password, secondSeed, (err) => {
assert.ifError(err)
+ assert.equal(accounts[0], secondAcct)
+ done()
+ })
+ })
- let newKeystore = idStore._idmgmt.keyStore
+ it('should return the expected third account', function (done) {
+ const thirdSeed = 'phone coyote caught pattern found table wedding list tumble broccoli chief swing'
+ const thirdAcct = '0xb0e868f24bc7fec2bce2efc2b1c344d7569cd9d2'
- assert.equal(accounts[0], firstAccount)
+ idStore.recoverFromSeed(password, thirdSeed, (err) => {
+ assert.ifError(err)
+ assert.equal(accounts[0], thirdAcct)
done()
})
})