@@ -18,12 +18,7 @@ process.on('warning', common.mustCall((warning) => {
1818 case 1 :
1919 // Warning about rejection not being handled (will be next tick)
2020 assert . strictEqual ( warning . name , 'UnhandledPromiseRejectionWarning' ) ;
21- assert . match (
22- warning . message ,
23- / U n h a n d l e d p r o m i s e r e j e c t i o n / ,
24- 'Expected warning message to contain "Unhandled promise rejection" ' +
25- `but did not. Had "${ warning . message } " instead.`
26- ) ;
21+ assert . match ( warning . message , / U n h a n d l e d p r o m i s e r e j e c t i o n / ) ;
2722 break ;
2823 case 2 :
2924 // Number rejection error displayed. Note it's been stringified
@@ -32,18 +27,12 @@ process.on('warning', common.mustCall((warning) => {
3227 case 3 :
3328 // Unhandled rejection warning (won't be handled next tick)
3429 assert . strictEqual ( warning . name , 'UnhandledPromiseRejectionWarning' ) ;
35- assert . match (
36- warning . message ,
37- / U n h a n d l e d p r o m i s e r e j e c t i o n / ,
38- 'Expected warning message to contain "Unhandled promise rejection" ' +
39- `but did not. Had "${ warning . message } " instead.`
40- ) ;
30+ assert . match ( warning . message , / U n h a n d l e d p r o m i s e r e j e c t i o n / ) ;
4131 break ;
4232 case 4 :
4333 // Rejection handled asynchronously.
4434 assert . strictEqual ( warning . name , 'PromiseRejectionHandledWarning' ) ;
45- assert . match ( warning . message ,
46- / P r o m i s e r e j e c t i o n w a s h a n d l e d a s y n c h r o n o u s l y / ) ;
35+ assert . match ( warning . message , / P r o m i s e r e j e c t i o n w a s h a n d l e d a s y n c h r o n o u s l y / ) ;
4736 }
4837} , 5 ) ) ;
4938
0 commit comments