add fromString test for bip32

...since it was lacking any tests
This commit is contained in:
Ryan X. Charles 2014-09-19 21:02:57 -07:00
parent d57613bc91
commit ffdfe0ce83
1 changed files with 11 additions and 0 deletions

View File

@ -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');