@@ -17,16 +17,20 @@ const assert = require('assert');
1717//
1818// process.pid, String(process.pid): ourself
1919
20- assert . throws ( function ( ) { process . kill ( 'SIGTERM' ) ; } , TypeError ) ;
21- assert . throws ( function ( ) { process . kill ( null ) ; } , TypeError ) ;
22- assert . throws ( function ( ) { process . kill ( undefined ) ; } , TypeError ) ;
23- assert . throws ( function ( ) { process . kill ( + 'not a number' ) ; } , TypeError ) ;
24- assert . throws ( function ( ) { process . kill ( 1 / 0 ) ; } , TypeError ) ;
25- assert . throws ( function ( ) { process . kill ( - 1 / 0 ) ; } , TypeError ) ;
20+ assert . throws ( function ( ) { process . kill ( 'SIGTERM' ) ; } ,
21+ / ^ T y p e E r r o r : i n v a l i d p i d $ / ) ;
22+ 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 $ / ) ;
23+ assert . throws ( function ( ) { process . kill ( undefined ) ; } ,
24+ / ^ T y p e E r r o r : i n v a l i d p i d $ / ) ;
25+ assert . throws ( function ( ) { process . kill ( + 'not a number' ) ; } ,
26+ / ^ T y p e E r r o r : i n v a l i d p i d $ / ) ;
27+ 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 $ / ) ;
28+ 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 $ / ) ;
2629
2730// Test that kill throws an error for invalid signal
2831
29- assert . throws ( function ( ) { process . kill ( 1 , 'test' ) ; } , Error ) ;
32+ assert . throws ( function ( ) { process . kill ( 1 , 'test' ) ; } ,
33+ / ^ E r r o r : U n k n o w n s i g n a l : t e s t $ / ) ;
3034
3135// Test kill argument processing in valid cases.
3236//
0 commit comments