Browse Source

Renames variables to better reflect their values

hk-custom-address
Daniel Cousens 11 years ago
parent
commit
2e2932c410
  1. 16
      test/hdwallet.js

16
test/hdwallet.js

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

Loading…
Cancel
Save