diff --git a/test/parallel/test-crypto-from-binary.js b/test/parallel/test-crypto-from-binary.js index 78e3b456779c9b..b2782e04f28ff0 100644 --- a/test/parallel/test-crypto-from-binary.js +++ b/test/parallel/test-crypto-from-binary.js @@ -19,7 +19,7 @@ var ucs2_control = 'a\u0000'; // grow the strings to proper length while (ucs2_control.length <= EXTERN_APEX) { - ucs2_control += ucs2_control; + ucs2_control = ucs2_control.repeat(2); } diff --git a/test/parallel/test-http-dns-error.js b/test/parallel/test-http-dns-error.js index ad360f5b4db4c4..37e9fca62e01e4 100644 --- a/test/parallel/test-http-dns-error.js +++ b/test/parallel/test-http-dns-error.js @@ -10,12 +10,7 @@ if (common.hasCrypto) { console.log('1..0 # Skipped: missing crypto'); } -var host = '********'; -host += host; -host += host; -host += host; -host += host; -host += host; +var host = '*'.repeat(256); function do_not_call() { throw new Error('This function should not have been called.'); diff --git a/test/parallel/test-http-parser.js b/test/parallel/test-http-parser.js index 2354871f804248..ca7afff3aac757 100644 --- a/test/parallel/test-http-parser.js +++ b/test/parallel/test-http-parser.js @@ -245,7 +245,7 @@ function expectBody(expected) { (function() { // 256 X-Filler headers var lots_of_headers = 'X-Filler: 42' + CRLF; - for (var i = 0; i < 8; ++i) lots_of_headers += lots_of_headers; + lots_of_headers = lots_of_headers.repeat(256); var request = Buffer( 'GET /foo/bar/baz?quux=42#1337 HTTP/1.0' + CRLF + diff --git a/test/parallel/test-net-dns-error.js b/test/parallel/test-net-dns-error.js index fc27eb1b9b0751..eed59cddebb851 100644 --- a/test/parallel/test-net-dns-error.js +++ b/test/parallel/test-net-dns-error.js @@ -7,12 +7,7 @@ var net = require('net'); var expected_bad_connections = 1; var actual_bad_connections = 0; -var host = '********'; -host += host; -host += host; -host += host; -host += host; -host += host; +var host = '*'.repeat(256); function do_not_call() { throw new Error('This function should not have been called.');