summaryrefslogtreecommitdiff
path: root/test/parallel/test-buffer-includes.js
diff options
context:
space:
mode:
authorPeter Marshall <petermarshall@chromium.org>2018-11-22 10:16:29 +0100
committerMichaƫl Zasso <targos@protonmail.com>2019-03-14 18:51:13 +0100
commit78c8491a7efddcb56f9ffe0fb2d4df727b68ae39 (patch)
tree300d7f9eed7121f02c02b798a986236567f5aa4f /test/parallel/test-buffer-includes.js
parente0b3de1e904fdffb0a5e0e89a27ba69d80354418 (diff)
downloadandroid-node-v8-78c8491a7efddcb56f9ffe0fb2d4df727b68ae39.tar.gz
android-node-v8-78c8491a7efddcb56f9ffe0fb2d4df727b68ae39.tar.bz2
android-node-v8-78c8491a7efddcb56f9ffe0fb2d4df727b68ae39.zip
test: remove apply calls over 65534 arg limit
PR-URL: https://github.com/nodejs/node/pull/25852 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'test/parallel/test-buffer-includes.js')
-rw-r--r--test/parallel/test-buffer-includes.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/parallel/test-buffer-includes.js b/test/parallel/test-buffer-includes.js
index 2a163f9e0c..605f988de5 100644
--- a/test/parallel/test-buffer-includes.js
+++ b/test/parallel/test-buffer-includes.js
@@ -214,8 +214,9 @@ assert(asciiString.includes('leb', 0));
// Search in string containing many non-ASCII chars.
const allCodePoints = [];
-for (let i = 0; i < 65536; i++) allCodePoints[i] = i;
-const allCharsString = String.fromCharCode.apply(String, allCodePoints);
+for (let i = 0; i < 65534; i++) allCodePoints[i] = i;
+const allCharsString = String.fromCharCode.apply(String, allCodePoints) +
+ String.fromCharCode(65534, 65535);
const allCharsBufferUtf8 = Buffer.from(allCharsString);
const allCharsBufferUcs2 = Buffer.from(allCharsString, 'ucs2');