Skip to content

Commit b5b506a

Browse files
committed
doc: align Buffer.concat documentation with behavior
nodejs/node#60405
1 parent d1c7435 commit b5b506a

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

patches/node/support_v8_sandboxed_pointers.patch

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,3 +309,17 @@ index ef659f1c39f7ee958879bf395377bc99911fc346..225b1465b7c97d972a38968faf6d6850
309309
auto ab = ArrayBuffer::New(isolate, std::move(bs));
310310
v8::Local<Uint8Array> u8 = v8::Uint8Array::New(ab, 0, 1);
311311

312+
diff --git a/test/parallel/test-buffer-concat.js b/test/parallel/test-buffer-concat.js
313+
index 9f0eadd2f10163c3c30657c84eb0ba55db17364d..7c1a6f71ca24dd2e54f9f5987aae2014b44bfba6 100644
314+
--- a/test/parallel/test-buffer-concat.js
315+
+++ b/test/parallel/test-buffer-concat.js
316+
@@ -84,8 +84,7 @@ assert.throws(() => {
317+
Buffer.concat([Buffer.from('hello')], -2);
318+
}, {
319+
code: 'ERR_OUT_OF_RANGE',
320+
- message: 'The value of "length" is out of range. It must be >= 0 && <= 9007199254740991. ' +
321+
- 'Received -2'
322+
+ message: /The value of "length" is out of range\. It must be >= 0 && <= (?:34359738367|9007199254740991)\. Received -2/
323+
});
324+
325+
// eslint-disable-next-line node-core/crypto-check

0 commit comments

Comments
 (0)