@@ -16,22 +16,12 @@ describe("computeProposerIndex", () => {
1616 }
1717
1818 it ( "should compute proposer index for phase0" , ( ) => {
19- const result = bindings . computeProposerIndex (
20- "phase0" ,
21- effectiveBalanceIncrements ,
22- indices ,
23- seed
24- ) ;
19+ const result = bindings . computeProposerIndex ( "phase0" , effectiveBalanceIncrements , indices , seed ) ;
2520 expect ( result ) . toBe ( 789 ) ;
2621 } ) ;
2722
2823 it ( "should compute proposer index for electra" , ( ) => {
29- const result = bindings . computeProposerIndex (
30- "electra" ,
31- effectiveBalanceIncrements ,
32- indices ,
33- seed
34- ) ;
24+ const result = bindings . computeProposerIndex ( "electra" , effectiveBalanceIncrements , indices , seed ) ;
3525 expect ( result ) . toBe ( 161 ) ;
3626 } ) ;
3727
@@ -40,12 +30,7 @@ describe("computeProposerIndex", () => {
4030 const expected = 789 ;
4131
4232 for ( const fork of forks ) {
43- const result = bindings . computeProposerIndex (
44- fork ,
45- effectiveBalanceIncrements ,
46- indices ,
47- seed
48- ) ;
33+ const result = bindings . computeProposerIndex ( fork , effectiveBalanceIncrements , indices , seed ) ;
4934 expect ( result ) . toBe ( expected ) ;
5035 }
5136 } ) ;
@@ -55,20 +40,15 @@ describe("computeProposerIndex", () => {
5540 const expected = 161 ;
5641
5742 for ( const fork of forks ) {
58- const result = bindings . computeProposerIndex (
59- fork ,
60- effectiveBalanceIncrements ,
61- indices ,
62- seed
63- ) ;
43+ const result = bindings . computeProposerIndex ( fork , effectiveBalanceIncrements , indices , seed ) ;
6444 expect ( result ) . toBe ( expected ) ;
6545 }
6646 } ) ;
6747
6848 it ( "should throw on invalid seed length" , ( ) => {
6949 const shortSeed = new Uint8Array ( 16 ) ;
70- expect ( ( ) =>
71- bindings . computeProposerIndex ( "phase0" , effectiveBalanceIncrements , indices , shortSeed )
72- ) . toThrow ( "InvalidSeedLength" ) ;
50+ expect ( ( ) => bindings . computeProposerIndex ( "phase0" , effectiveBalanceIncrements , indices , shortSeed ) ) . toThrow (
51+ "InvalidSeedLength"
52+ ) ;
7353 } ) ;
7454} ) ;
0 commit comments