Fix #160, Seed.parse_json of hex

This commit is contained in:
Nicholas Dudfield
2014-09-06 10:21:55 +07:00
parent 03386a61e9
commit b4564a86b4
3 changed files with 14 additions and 4 deletions

View File

@@ -26,8 +26,9 @@ describe('Signing', function() {
assert(_isNaN(new Seed().parse_json('').to_json()));
});
it('hex string', function() {
// 32 0s is a valid hex repr of seed bytes
var str = new Array(33).join('0');
assert(_isNaN(new Seed().parse_json(str).to_json()));
assert.strictEqual((new Seed().parse_json(str).to_json()), 'sp6JS7f14BuwFY8Mw6bTtLKWauoUs');
});
it('passphrase', function() {
var str = new Array(60).join('0');