From 8be718a0bd21b9779e79345fa2107e3e3fd87ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Jedli=C4=8Dka?= Date: Sat, 11 Nov 2023 19:24:37 +0000 Subject: [PATCH] test: use destructuring for accessing setting values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/50609 Reviewed-By: Yagiz Nizipli Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- test/parallel/test-http2-session-settings.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-http2-session-settings.js b/test/parallel/test-http2-session-settings.js index 571ee87d93768c..bcf78c6aa512a0 100644 --- a/test/parallel/test-http2-session-settings.js +++ b/test/parallel/test-http2-session-settings.js @@ -104,15 +104,15 @@ server.listen( ['maxHeaderListSize', 2 ** 32], ['maxHeaderSize', -1], ['maxHeaderSize', 2 ** 32], - ].forEach((i) => { + ].forEach(([key, value]) => { const settings = {}; - settings[i[0]] = i[1]; + settings[key] = value; assert.throws( () => client.settings(settings), { name: 'RangeError', code: 'ERR_HTTP2_INVALID_SETTING_VALUE', - message: `Invalid value for setting "${i[0]}": ${i[1]}` + message: `Invalid value for setting "${key}": ${value}` } ); });