From ffdfe0ce83e68dc3a3ca4a49992f568a528ea677 Mon Sep 17 00:00:00 2001 From: "Ryan X. Charles" Date: Fri, 19 Sep 2014 21:02:57 -0700 Subject: [PATCH] add fromString test for bip32 ...since it was lacking any tests --- test/bip32.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/bip32.js b/test/bip32.js index a0faac038..a843c48b1 100644 --- a/test/bip32.js +++ b/test/bip32.js @@ -319,6 +319,17 @@ describe('BIP32', function() { }); }); + describe('#fromString', function() { + + it('should make a bip32 from a string', function() { + var str = 'xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi'; + var bip32 = new BIP32().fromString(str); + should.exist(bip32); + bip32.toString().should.equal(str); + }); + + }); + describe('#toString', function() { var bip32 = new BIP32(); bip32.fromRandom('mainnet');