Renames variables to better reflect their values

This commit is contained in:
Daniel Cousens 2014-03-23 05:45:43 +11:00
parent e9fdfecfea
commit 2e2932c410

View file

@ -33,20 +33,16 @@ describe('HDWallet', function() {
})
describe('constructor & seed deserialization', function() {
var expectedPrivKey, seed;
beforeEach(function(){
expectedPrivKey = 'KwkW62Lzm4a7Eo5nPLezrVjWBGFh2KMfpyf4Swz9NmfsVaLoeXv9'
seed = [
99, 114, 97, 122, 121, 32, 104, 111, 114, 115, 101, 32, 98,
97, 116, 116, 101, 114, 121, 32, 115, 116, 97, 112, 108, 101
]
})
var expectedWif = 'KwkW62Lzm4a7Eo5nPLezrVjWBGFh2KMfpyf4Swz9NmfsVaLoeXv9';
var seed = [
99, 114, 97, 122, 121, 32, 104, 111, 114, 115, 101, 32, 98,
97, 116, 116, 101, 114, 121, 32, 115, 116, 97, 112, 108, 101
];
it('creates from binary seed', function() {
var hd = new HDWallet(seed)
assert.equal(hd.priv.toWif(), expectedPrivKey)
assert.equal(hd.priv.toWif(), expectedWif)
assert(hd.pub)
})
@ -54,7 +50,7 @@ describe('HDWallet', function() {
it('creates from hex seed', function() {
var hd = HDWallet.fromSeedHex(b2h(seed))
assert.equal(hd.priv.toWif(), expectedPrivKey)
assert.equal(hd.priv.toWif(), expectedWif)
assert(hd.pub)
})
})
@ -63,7 +59,7 @@ describe('HDWallet', function() {
it('creates from string seed', function() {
var hd = HDWallet.fromSeedString(convert.bytesToString(seed))
assert.equal(hd.priv.toWif(), expectedPrivKey)
assert.equal(hd.priv.toWif(), expectedWif)
assert(hd.pub)
})
})