Skip to content

Commit a7d0b41

Browse files
committed
Reduce number of HDNode tests which cause TravisCI to timeout.
1 parent a980fc3 commit a7d0b41

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/test-hdnode.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,20 @@ var assert = require('assert');
55
var utils = require('./utils');
66
var ethers = utils.getEthers(__filename);
77

8+
function skip(name) {
9+
var match = name.match(/^random-([0-9]+)$/);
10+
if (match && parseInt(match[1]) > 512) {
11+
return true;
12+
}
13+
return false;
14+
}
15+
816
describe('Test HD Node Derivation', function(test) {
917

1018
var tests = utils.loadTests('hdnode');
1119
tests.forEach(function(test) {
12-
it('Derives the HD nodes - ' + test.name, function() {
20+
if (skip(test.name)) { return; }
21+
it('Derives the HD nodes - ' + test.name, function() {
1322
this.timeout(10000);
1423

1524
//var rootNode = new ethers.utils.HDNode.fromSeed(test.seed);
@@ -87,6 +96,7 @@ describe('Test HD Node Derivation', function(test) {
8796
describe('Test HD Mnemonic Phrases', function testMnemonic() {
8897
var tests = utils.loadTests('hdnode');
8998
tests.forEach(function(test) {
99+
if (skip(test.name)) { return; }
90100
it(('converts mnemonic phrases - ' + test.name), function() {
91101
this.timeout(1000000);
92102

0 commit comments

Comments
 (0)