fix broken tests

This commit is contained in:
Manuel Araoz 2015-02-09 16:06:18 -03:00
parent 85e938ba72
commit edda8ea723
2 changed files with 1 additions and 4 deletions

View File

@ -106,7 +106,6 @@ HDPrivateKey._getDerivationIndexes = function(path) {
}
var indexes = steps.slice(1).map(function(step) {
console.log(step);
var isHardened = step.slice(-1) === '\'';
if (isHardened) {
step = step.slice(0, -1);
@ -122,7 +121,6 @@ HDPrivateKey._getDerivationIndexes = function(path) {
return index;
});
console.log(indexes);
return _.any(indexes, isNaN) ? null : indexes;
};

View File

@ -222,7 +222,6 @@ describe('HDPrivate key interface', function() {
'K',
'm/',
'm/12asd',
HDPrivateKey.MaxHardened,
'm/1/2//3'
];
@ -237,7 +236,7 @@ describe('HDPrivate key interface', function() {
var indexes;
indexes = HDPrivateKey._getDerivationIndexes('m/-1/12');
indexes.should.eql([-1, 12]);
expect(indexes).to.equal(null);
indexes = HDPrivateKey._getDerivationIndexes('m/0/12/12\'');
indexes.should.eql([0, 12, HDPrivateKey.Hardened + 12]);