diff --git a/test/pummel/test-tls-connect-memleak.js b/test/pummel/test-tls-connect-memleak.js index 1ef131d6876ac4..6809b23baf3926 100644 --- a/test/pummel/test-tls-connect-memleak.js +++ b/test/pummel/test-tls-connect-memleak.js @@ -44,9 +44,7 @@ tls.createServer({ { // 2**26 == 64M entries - let junk = [0]; - - for (let i = 0; i < 26; ++i) junk = junk.concat(junk); + const junk = new Array(2 ** 26).fill(0); const options = { rejectUnauthorized: false }; tls.connect(common.PORT, '127.0.0.1', options, function() {