diff --git a/lib/buffer.js b/lib/buffer.js index 3cc9e77a6c9..24a24f369be 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -432,8 +432,7 @@ Buffer[kIsEncodingSymbol] = Buffer.isEncoding; Buffer.concat = function concat(list, length) { let i; if (!Array.isArray(list)) { - throw new ERR_INVALID_ARG_TYPE( - 'list', ['Array', 'Buffer', 'Uint8Array'], list); + throw new ERR_INVALID_ARG_TYPE('list', 'Array', list); } if (list.length === 0) diff --git a/test/parallel/test-buffer-concat.js b/test/parallel/test-buffer-concat.js index 07c2189d97d..7ef5b9cd359 100644 --- a/test/parallel/test-buffer-concat.js +++ b/test/parallel/test-buffer-concat.js @@ -49,8 +49,8 @@ assert.strictEqual(flatLongLen.toString(), check); Buffer.concat(value); }, { code: 'ERR_INVALID_ARG_TYPE', - message: 'The "list" argument must be one of type Array, Buffer, ' + - `or Uint8Array. Received type ${typeof value}` + message: 'The "list" argument must be of type Array. ' + + `Received type ${typeof value}` }); });