@@ -17,16 +17,20 @@ const assert = require('assert');
17
17
//
18
18
// process.pid, String(process.pid): ourself
19
19
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 $ / ) ;
26
29
27
30
// Test that kill throws an error for invalid signal
28
31
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 $ / ) ;
30
34
31
35
// Test kill argument processing in valid cases.
32
36
//
0 commit comments