summaryrefslogtreecommitdiff
path: root/cli/tests/node_compat/test/parallel/test-buffer-copy.js
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2023-11-25 11:35:36 +0900
committerGitHub <noreply@github.com>2023-11-25 11:35:36 +0900
commit5710fffb120eba88e1b261e3ef379cb02575de42 (patch)
tree1e5fadbbba88bf816c124ed559082a5968adf1d3 /cli/tests/node_compat/test/parallel/test-buffer-copy.js
parent60b5d32d902deb46f640cbdb0d2d4caf47a437c4 (diff)
chore: update node_compat test suites to v18.18.2 (#21328)
Diffstat (limited to 'cli/tests/node_compat/test/parallel/test-buffer-copy.js')
-rw-r--r--cli/tests/node_compat/test/parallel/test-buffer-copy.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/cli/tests/node_compat/test/parallel/test-buffer-copy.js b/cli/tests/node_compat/test/parallel/test-buffer-copy.js
index ba1865441..2e7a012aa 100644
--- a/cli/tests/node_compat/test/parallel/test-buffer-copy.js
+++ b/cli/tests/node_compat/test/parallel/test-buffer-copy.js
@@ -162,11 +162,20 @@ assert.throws(
{
code: 'ERR_OUT_OF_RANGE',
name: 'RangeError',
- message: 'The value of "sourceStart" is out of range. ' +
- 'It must be >= 0. Received -1'
}
);
+/*
+// Copy throws if sourceStart is greater than length of source
+assert.throws(
+ () => Buffer.allocUnsafe(5).copy(Buffer.allocUnsafe(5), 0, 100),
+ {
+ code: 'ERR_OUT_OF_RANGE',
+ name: 'RangeError',
+ }
+);
+*/
+
{
// Check sourceEnd resets to targetEnd if former is greater than the latter
b.fill(++cntr);