@@ -25,11 +25,15 @@ function checkRandom(name: string): boolean {
2525 return true ;
2626}
2727
28+ const isBrowser = ( typeof ( navigator ) !== "undefined" ) ;
29+
2830describe ( 'Test HD Node Derivation is Case Agnostic' , function ( ) {
2931 let tests : Array < TestCase . HDWallet > = loadTests ( 'hdnode' ) ;
3032 tests . forEach ( ( test ) => {
3133 if ( ! checkRandom ( test . name ) ) { return ; }
3234
35+ if ( isBrowser && test . locale !== "en" ) { return ; }
36+
3337 it ( "Normalizes case - " + test . name , function ( ) {
3438 this . timeout ( 10000 ) ;
3539 let wordlist = ( < { [ locale : string ] : ethers . Wordlist } > ( ethers . wordlists ) ) [ test . locale ] ;
@@ -54,6 +58,8 @@ describe('Test HD Node Derivation from Seed', function() {
5458 // If there is nothing to derive, skip this portion of the test
5559 if ( test . hdnodes . length === 0 ) { return ; }
5660
61+ if ( isBrowser && test . locale !== "en" ) { return ; }
62+
5763 it ( 'Derives the HD nodes - ' + test . name , function ( ) {
5864 this . timeout ( 10000 ) ;
5965
@@ -79,6 +85,8 @@ describe('Test HD Node Derivation from Mnemonic', function() {
7985 tests . forEach ( ( test ) => {
8086 if ( ! checkRandom ( test . name ) ) { return ; }
8187
88+ if ( isBrowser && test . locale !== "en" ) { return ; }
89+
8290 // If there is nothing to derive, skip this portion of the test
8391 if ( test . hdnodes . length === 0 ) { return ; }
8492
@@ -114,6 +122,8 @@ describe('Test HD Mnemonic Phrases', function testMnemonic() {
114122 tests . forEach ( function ( test ) {
115123 if ( ! checkRandom ( test . name ) ) { return ; }
116124
125+ if ( isBrowser && test . locale !== "en" ) { return ; }
126+
117127 it ( ( 'converts mnemonic phrases - ' + test . name ) , function ( ) {
118128 this . timeout ( 1000000 ) ;
119129
0 commit comments