@@ -28,17 +28,17 @@ const buf = Buffer.from('test');
2828const host = '127.0.0.1' ;
2929const sock = dgram . createSocket ( 'udp4' ) ;
3030
31- assert . throws ( function ( ) {
31+ assert . throws ( ( ) => {
3232 sock . send ( ) ;
3333} , TypeError ) ; // First argument should be a buffer.
3434
3535// send(buf, offset, length, port, host)
36- assert . throws ( function ( ) { sock . send ( buf , 1 , 1 , - 1 , host ) ; } , RangeError ) ;
37- assert . throws ( function ( ) { sock . send ( buf , 1 , 1 , 0 , host ) ; } , RangeError ) ;
38- assert . throws ( function ( ) { sock . send ( buf , 1 , 1 , 65536 , host ) ; } , RangeError ) ;
36+ assert . throws ( ( ) => { sock . send ( buf , 1 , 1 , - 1 , host ) ; } , RangeError ) ;
37+ assert . throws ( ( ) => { sock . send ( buf , 1 , 1 , 0 , host ) ; } , RangeError ) ;
38+ assert . throws ( ( ) => { sock . send ( buf , 1 , 1 , 65536 , host ) ; } , RangeError ) ;
3939
4040// send(buf, port, host)
41- assert . throws ( function ( ) { sock . send ( 23 , 12345 , host ) ; } , TypeError ) ;
41+ assert . throws ( ( ) => { sock . send ( 23 , 12345 , host ) ; } , TypeError ) ;
4242
4343// send([buf1, ..], port, host)
44- assert . throws ( function ( ) { sock . send ( [ buf , 23 ] , 12345 , host ) ; } , TypeError ) ;
44+ assert . throws ( ( ) => { sock . send ( [ buf , 23 ] , 12345 , host ) ; } , TypeError ) ;
0 commit comments