@@ -38,16 +38,20 @@ const assert = require('assert');
38
38
//
39
39
// process.pid, String(process.pid): ourself
40
40
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 $ / ) ;
47
50
48
51
// Test that kill throws an error for invalid signal
49
52
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 $ / ) ;
51
55
52
56
// Test kill argument processing in valid cases.
53
57
//
0 commit comments