Browse Source

remove test from travis

patch-2
Ryan X. Charles 11 years ago
parent
commit
8f5890fc03
  1. 31
      test/test.BIP39.js

31
test/test.BIP39.js

@ -145,21 +145,24 @@ describe('BIP39', function() {
var phrase = BIP39.mnemonic(BIP39WordlistEn, 128); var phrase = BIP39.mnemonic(BIP39WordlistEn, 128);
}); });
//do not run these slow tests on TRAVIS which often fails
var vectors = bip39_vectors['english']; var vectors = bip39_vectors['english'];
for (var v = 0 ; v < vectors.length ; v++) { if (!process.env.TRAVIS && !process.env.CI) {
(function(v){ for (var v = 0 ; v < vectors.length ; v++) {
it('should pass test vector ' + v, function() { (function(v){
var vector = vectors[v]; it('should pass test vector ' + v, function() {
var code = vector[0]; var vector = vectors[v];
var mnemonic = vector[1]; var code = vector[0];
var seed = vector[2]; var mnemonic = vector[1];
var mnemonic1 = BIP39.entropy2mnemonic(BIP39WordlistEn, new Buffer(code, 'hex')); var seed = vector[2];
var seed1 = BIP39.mnemonic2seed(mnemonic, 'TREZOR'); var mnemonic1 = BIP39.entropy2mnemonic(BIP39WordlistEn, new Buffer(code, 'hex'));
BIP39.check(BIP39WordlistEn, mnemonic).should.be.true; var seed1 = BIP39.mnemonic2seed(mnemonic, 'TREZOR');
mnemonic1.should.equal(mnemonic); BIP39.check(BIP39WordlistEn, mnemonic).should.be.true;
seed1.toString('hex').should.equal(seed) mnemonic1.should.equal(mnemonic);
}); seed1.toString('hex').should.equal(seed)
})(v); });
})(v);
}
} }
}); });

Loading…
Cancel
Save