From 2e2932c4104249a1b30af275d4be87f55c078874 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Sun, 23 Mar 2014 05:45:43 +1100 Subject: [PATCH] Renames variables to better reflect their values --- test/hdwallet.js | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/test/hdwallet.js b/test/hdwallet.js index 631e46b..560a45b 100644 --- a/test/hdwallet.js +++ b/test/hdwallet.js @@ -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) }) })