File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -278,14 +278,22 @@ function resetCaptureOnThrowInError() {
278278function argValidation ( ) {
279279
280280 function testType ( obj ) {
281+ const received = obj . constructor . name !== 'Number' ?
282+ `an instance of ${ obj . constructor . name } ` :
283+ `type number (${ obj } )` ;
284+
281285 assert . throws ( ( ) => new EventEmitter ( { captureRejections : obj } ) , {
282286 code : 'ERR_INVALID_ARG_TYPE' ,
283- name : 'TypeError'
287+ name : 'TypeError' ,
288+ message : 'The "options.captureRejections" property must be of type ' +
289+ `boolean. Received ${ received } `
284290 } ) ;
285291
286292 assert . throws ( ( ) => EventEmitter . captureRejections = obj , {
287293 code : 'ERR_INVALID_ARG_TYPE' ,
288- name : 'TypeError'
294+ name : 'TypeError' ,
295+ message : 'The "EventEmitter.captureRejections" property must be of ' +
296+ `type boolean. Received ${ received } `
289297 } ) ;
290298 }
291299
You can’t perform that action at this time.
0 commit comments