@@ -21,9 +21,10 @@ import { TinySecp256k1Interface } from '../src/types';
2121 const fixtures = require ( './fixtures/' + p ) ;
2222
2323 fixtures . valid . forEach ( ( f : any ) => {
24+ const options = Object . assign ( { eccLib } , f . options || { } ) ;
2425 it ( f . description + ' as expected' , ( ) => {
2526 const args = u . preform ( f . arguments ) ;
26- const actual = fn ( args , f . options , eccLib ) ;
27+ const actual = fn ( args , options , eccLib ) ;
2728
2829 u . equate ( actual , f . expected , f . arguments ) ;
2930 } ) ;
@@ -32,7 +33,7 @@ import { TinySecp256k1Interface } from '../src/types';
3233 const args = u . preform ( f . arguments ) ;
3334 const actual = fn (
3435 args ,
35- Object . assign ( { } , f . options , {
36+ Object . assign ( { } , options , {
3637 validate : false ,
3738 } ) ,
3839 eccLib ,
@@ -43,6 +44,7 @@ import { TinySecp256k1Interface } from '../src/types';
4344 } ) ;
4445
4546 fixtures . invalid . forEach ( ( f : any ) => {
47+ const options = Object . assign ( { eccLib } , f . options || { } ) ;
4648 it (
4749 'throws ' +
4850 f . exception +
@@ -51,7 +53,7 @@ import { TinySecp256k1Interface } from '../src/types';
5153 const args = u . preform ( f . arguments ) ;
5254
5355 assert . throws ( ( ) => {
54- fn ( args , f . options , eccLib ) ;
56+ fn ( args , options , eccLib ) ;
5557 } , new RegExp ( f . exception ) ) ;
5658 } ,
5759 ) ;
0 commit comments