@@ -14,19 +14,19 @@ test(`./build/${buildType}/binding_noexcept.node`);
14
14
function test ( bindingPath ) {
15
15
const binding = require ( bindingPath ) ;
16
16
17
- assert . throws ( ( ) => binding . error . throwApiError ( 'test' ) , err => {
17
+ assert . throws ( ( ) => binding . error . throwApiError ( 'test' ) , function ( err ) {
18
18
return err instanceof Error && err . message . includes ( 'Invalid' ) ;
19
19
} ) ;
20
20
21
- assert . throws ( ( ) => binding . error . throwJSError ( 'test' ) , err => {
21
+ assert . throws ( ( ) => binding . error . throwJSError ( 'test' ) , function ( err ) {
22
22
return err instanceof Error && err . message === 'test' ;
23
23
} ) ;
24
24
25
- assert . throws ( ( ) => binding . error . throwTypeError ( 'test' ) , err => {
25
+ assert . throws ( ( ) => binding . error . throwTypeError ( 'test' ) , function ( err ) {
26
26
return err instanceof TypeError && err . message === 'test' ;
27
27
} ) ;
28
28
29
- assert . throws ( ( ) => binding . error . throwRangeError ( 'test' ) , err => {
29
+ assert . throws ( ( ) => binding . error . throwRangeError ( 'test' ) , function ( err ) {
30
30
return err instanceof RangeError && err . message === 'test' ;
31
31
} ) ;
32
32
@@ -35,7 +35,7 @@ function test(bindingPath) {
35
35
( ) => {
36
36
throw new TypeError ( 'test' ) ;
37
37
} ) ,
38
- err => {
38
+ function ( err ) {
39
39
return err instanceof TypeError && err . message === 'test' && ! err . caught ;
40
40
} ) ;
41
41
@@ -44,7 +44,7 @@ function test(bindingPath) {
44
44
( ) => {
45
45
throw new TypeError ( 'test' ) ;
46
46
} ) ,
47
- err => {
47
+ function ( err ) {
48
48
return err instanceof TypeError && err . message === 'test' && err . caught ;
49
49
} ) ;
50
50
@@ -57,11 +57,11 @@ function test(bindingPath) {
57
57
( ) => { throw new TypeError ( 'test' ) ; } ) ;
58
58
assert . strictEqual ( msg , 'test' ) ;
59
59
60
- assert . throws ( ( ) => binding . error . throwErrorThatEscapesScope ( 'test' ) , err => {
60
+ assert . throws ( ( ) => binding . error . throwErrorThatEscapesScope ( 'test' ) , function ( err ) {
61
61
return err instanceof Error && err . message === 'test' ;
62
62
} ) ;
63
63
64
- assert . throws ( ( ) => binding . error . catchAndRethrowErrorThatEscapesScope ( 'test' ) , err => {
64
+ assert . throws ( ( ) => binding . error . catchAndRethrowErrorThatEscapesScope ( 'test' ) , function ( err ) {
65
65
return err instanceof Error && err . message === 'test' && err . caught ;
66
66
} ) ;
67
67
0 commit comments