Skip to content

Commit

Permalink
update previously wrong messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Feb 8, 2025
1 parent bc4e6b9 commit 131b66a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/js/node/child_process/child_process-node.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ describe("fork", () => {
code: "ERR_INVALID_ARG_TYPE",
name: "TypeError",
message: expect.stringContaining(
`The "modulePath" argument must be of type string, Buffer, or URL. Received `,
`The "modulePath" argument must be of type string or an instance of Buffer or URL. Received `,
),
}),
);
Expand Down
5 changes: 3 additions & 2 deletions test/js/node/test/parallel/test-buffer-arraybuffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ assert.throws(function() {
}, {
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError',
message: 'The first argument must be of type string, Buffer, ArrayBuffer, Array, or Array-like Object.' +
' Received an instance of AB'
message: 'The first argument must be of type string or an instance of ' +
'Buffer, ArrayBuffer, Array, or Array-like Object. Received ' +
'an instance of AB'
});

// Test the byteOffset and length arguments
Expand Down
3 changes: 2 additions & 1 deletion test/js/node/test/parallel/test-buffer-from.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ deepStrictEqual(
const errObj = {
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError',
message: 'The first argument must be of type string, Buffer, ArrayBuffer, Array, or Array-like Object.' +
message: 'The first argument must be of type string or an instance of ' +
'Buffer, ArrayBuffer, Array, or Array-like Object.' +
common.invalidArgTypeHelper(input)
};
throws(() => Buffer.from(input), errObj);
Expand Down
9 changes: 6 additions & 3 deletions test/js/node/test/parallel/test-dgram-send-bad-arguments.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ function checkArgs(connected) {
{
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError',
message: 'The "buffer" argument must be of type string, Buffer, TypedArray, or DataView. Received undefined'
message: 'The "buffer" argument must be of type string or an instance ' +
'of Buffer, TypedArray, or DataView. Received undefined'
}
);

Expand Down Expand Up @@ -129,7 +130,8 @@ function checkArgs(connected) {
{
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError',
message: 'The "buffer" argument must be of type string, Buffer, TypedArray, or DataView. Received type number (23)'
message: 'The "buffer" argument must be of type string or an instance ' +
'of Buffer, TypedArray, or DataView. Received type number (23)'
}
);

Expand All @@ -139,7 +141,8 @@ function checkArgs(connected) {
{
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError',
message: 'The "buffer list arguments" argument must be of type string, Buffer, TypedArray, or DataView. ' +
message: 'The "buffer list arguments" argument must be of type string ' +
'or an instance of Buffer, TypedArray, or DataView. ' +
'Received an instance of Array'
}
);
Expand Down

0 comments on commit 131b66a

Please sign in to comment.