File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -114,10 +114,9 @@ E('ERR_HTTP_TRAILER_INVALID',
114114E ( 'ERR_INDEX_OUT_OF_RANGE' , 'Index out of range' ) ;
115115E ( 'ERR_INVALID_ARG_TYPE' , invalidArgType ) ;
116116E ( 'ERR_INVALID_ARRAY_LENGTH' ,
117- ( name , length , actual ) => {
117+ ( name , len , actual ) => {
118118 assert . strictEqual ( typeof actual , 'number' ) ;
119- return `The "${ name } " array must have a length of ${
120- length } . Received length ${ actual } `;
119+ return `The array "${ name } " (length ${ actual } ) must be of length ${ len } .` ;
121120 } ) ;
122121E ( 'ERR_INVALID_BUFFER_SIZE' , 'Buffer size must be a multiple of %s' ) ;
123122E ( 'ERR_INVALID_CALLBACK' , 'Callback must be a function' ) ;
Original file line number Diff line number Diff line change @@ -45,21 +45,21 @@ assert.throws(() => {
4545} , common . expectsError ( {
4646 code : 'ERR_INVALID_ARRAY_LENGTH' ,
4747 type : TypeError ,
48- message : 'The "time" array must have a length of 2. Received length 0 '
48+ message : 'The array "time" (length 0) must be of length 2. '
4949} ) ) ;
5050assert . throws ( ( ) => {
5151 process . hrtime ( [ 1 ] ) ;
5252} , common . expectsError ( {
5353 code : 'ERR_INVALID_ARRAY_LENGTH' ,
5454 type : TypeError ,
55- message : 'The "time" array must have a length of 2. Received length 1 '
55+ message : 'The array "time" (length 1) must be of length 2. '
5656} ) ) ;
5757assert . throws ( ( ) => {
5858 process . hrtime ( [ 1 , 2 , 3 ] ) ;
5959} , common . expectsError ( {
6060 code : 'ERR_INVALID_ARRAY_LENGTH' ,
6161 type : TypeError ,
62- message : 'The "time" array must have a length of 2. Received length 3 '
62+ message : 'The array "time" (length 3) must be of length 2. '
6363} ) ) ;
6464
6565function validateTuple ( tuple ) {
You can’t perform that action at this time.
0 commit comments