@@ -14,19 +14,19 @@ test(`./build/${buildType}/binding_noexcept.node`);
1414function test ( bindingPath ) {
1515 const binding = require ( bindingPath ) ;
1616
17- assert . throws ( ( ) => binding . error . throwApiError ( 'test' ) , err => {
17+ assert . throws ( ( ) => binding . error . throwApiError ( 'test' ) , function ( err ) {
1818 return err instanceof Error && err . message . includes ( 'Invalid' ) ;
1919 } ) ;
2020
21- assert . throws ( ( ) => binding . error . throwJSError ( 'test' ) , err => {
21+ assert . throws ( ( ) => binding . error . throwJSError ( 'test' ) , function ( err ) {
2222 return err instanceof Error && err . message === 'test' ;
2323 } ) ;
2424
25- assert . throws ( ( ) => binding . error . throwTypeError ( 'test' ) , err => {
25+ assert . throws ( ( ) => binding . error . throwTypeError ( 'test' ) , function ( err ) {
2626 return err instanceof TypeError && err . message === 'test' ;
2727 } ) ;
2828
29- assert . throws ( ( ) => binding . error . throwRangeError ( 'test' ) , err => {
29+ assert . throws ( ( ) => binding . error . throwRangeError ( 'test' ) , function ( err ) {
3030 return err instanceof RangeError && err . message === 'test' ;
3131 } ) ;
3232
@@ -35,7 +35,7 @@ function test(bindingPath) {
3535 ( ) => {
3636 throw new TypeError ( 'test' ) ;
3737 } ) ,
38- err => {
38+ function ( err ) {
3939 return err instanceof TypeError && err . message === 'test' && ! err . caught ;
4040 } ) ;
4141
@@ -44,7 +44,7 @@ function test(bindingPath) {
4444 ( ) => {
4545 throw new TypeError ( 'test' ) ;
4646 } ) ,
47- err => {
47+ function ( err ) {
4848 return err instanceof TypeError && err . message === 'test' && err . caught ;
4949 } ) ;
5050
@@ -57,11 +57,11 @@ function test(bindingPath) {
5757 ( ) => { throw new TypeError ( 'test' ) ; } ) ;
5858 assert . strictEqual ( msg , 'test' ) ;
5959
60- assert . throws ( ( ) => binding . error . throwErrorThatEscapesScope ( 'test' ) , err => {
60+ assert . throws ( ( ) => binding . error . throwErrorThatEscapesScope ( 'test' ) , function ( err ) {
6161 return err instanceof Error && err . message === 'test' ;
6262 } ) ;
6363
64- assert . throws ( ( ) => binding . error . catchAndRethrowErrorThatEscapesScope ( 'test' ) , err => {
64+ assert . throws ( ( ) => binding . error . catchAndRethrowErrorThatEscapesScope ( 'test' ) , function ( err ) {
6565 return err instanceof Error && err . message === 'test' && err . caught ;
6666 } ) ;
6767
0 commit comments