@@ -38,16 +38,20 @@ const assert = require('assert');
3838//
3939// process.pid, String(process.pid): ourself
4040
41- assert . throws ( function ( ) { process . kill ( 'SIGTERM' ) ; } , TypeError ) ;
42- assert . throws ( function ( ) { process . kill ( null ) ; } , TypeError ) ;
43- assert . throws ( function ( ) { process . kill ( undefined ) ; } , TypeError ) ;
44- assert . throws ( function ( ) { process . kill ( + 'not a number' ) ; } , TypeError ) ;
45- assert . throws ( function ( ) { process . kill ( 1 / 0 ) ; } , TypeError ) ;
46- assert . throws ( function ( ) { process . kill ( - 1 / 0 ) ; } , TypeError ) ;
41+ assert . throws ( function ( ) { process . kill ( 'SIGTERM' ) ; } ,
42+ / ^ T y p e E r r o r : i n v a l i d p i d $ / ) ;
43+ assert . throws ( function ( ) { process . kill ( null ) ; } , / ^ T y p e E r r o r : i n v a l i d p i d $ / ) ;
44+ assert . throws ( function ( ) { process . kill ( undefined ) ; } ,
45+ / ^ T y p e E r r o r : i n v a l i d p i d $ / ) ;
46+ assert . throws ( function ( ) { process . kill ( + 'not a number' ) ; } ,
47+ / ^ T y p e E r r o r : i n v a l i d p i d $ / ) ;
48+ assert . throws ( function ( ) { process . kill ( 1 / 0 ) ; } , / ^ T y p e E r r o r : i n v a l i d p i d $ / ) ;
49+ assert . throws ( function ( ) { process . kill ( - 1 / 0 ) ; } , / ^ T y p e E r r o r : i n v a l i d p i d $ / ) ;
4750
4851// Test that kill throws an error for invalid signal
4952
50- assert . throws ( function ( ) { process . kill ( 1 , 'test' ) ; } , Error ) ;
53+ assert . throws ( function ( ) { process . kill ( 1 , 'test' ) ; } ,
54+ / ^ E r r o r : U n k n o w n s i g n a l : t e s t $ / ) ;
5155
5256// Test kill argument processing in valid cases.
5357//
0 commit comments