@@ -14,15 +14,20 @@ describe('Base58', function () {
14
14
15
15
describe ( 'base58' , function ( ) {
16
16
describe ( 'encode/decode' , function ( ) {
17
- for ( const length of [ 0 , 1 , 2 , 3 , 4 , 32 , 42 , 128 , 384 ] ) // 512 runs out of gas
18
- it ( `buffer of length ${ length } ` , async function ( ) {
19
- const buffer = ethers . randomBytes ( length ) ;
20
- const hex = ethers . hexlify ( buffer ) ;
21
- const b58 = ethers . encodeBase58 ( buffer ) ;
17
+ // length 512 runs out of gas.
18
+ // this checks are very slow when running coverage, causing CI to timeout.
19
+ for ( const length of [ 0 , 1 , 2 , 3 , 4 , 32 , 42 , 128 , 384 ] )
20
+ it (
21
+ [ length > 32 && '[skip-on-coverage]' , `buffer of length ${ length } ` ] . filter ( Boolean ) . join ( ' ' ) ,
22
+ async function ( ) {
23
+ const buffer = ethers . randomBytes ( length ) ;
24
+ const hex = ethers . hexlify ( buffer ) ;
25
+ const b58 = ethers . encodeBase58 ( buffer ) ;
22
26
23
- await expect ( this . mock . $encode ( hex ) ) . to . eventually . equal ( b58 ) ;
24
- await expect ( this . mock . $decode ( b58 ) ) . to . eventually . equal ( hex ) ;
25
- } ) ;
27
+ await expect ( this . mock . $encode ( hex ) ) . to . eventually . equal ( b58 ) ;
28
+ await expect ( this . mock . $decode ( b58 ) ) . to . eventually . equal ( hex ) ;
29
+ } ,
30
+ ) ;
26
31
} ) ;
27
32
28
33
describe ( 'decode invalid format' , function ( ) {
0 commit comments