mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
errors,buffer: port errors to internal/errors
PR-URL: https://github.com/nodejs/node/pull/13976 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This commit is contained in:
parent
1562fb9ea7
commit
dbfe8c4ea2
28 changed files with 342 additions and 143 deletions
|
@ -54,11 +54,12 @@ assertWrongList(['hello', Buffer.from('world')]);
|
|||
function assertWrongList(value) {
|
||||
assert.throws(() => {
|
||||
Buffer.concat(value);
|
||||
}, function(err) {
|
||||
return err instanceof TypeError &&
|
||||
err.message === '"list" argument must be an Array of Buffer ' +
|
||||
'or Uint8Array instances';
|
||||
});
|
||||
}, common.expectsError({
|
||||
code: 'ERR_INVALID_ARG_TYPE',
|
||||
type: TypeError,
|
||||
message: 'The "list" argument must be one of type ' +
|
||||
'array, buffer, or uint8Array'
|
||||
}));
|
||||
}
|
||||
|
||||
const random10 = common.hasCrypto ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue