Skip to content

Commit

Permalink
test: use destructuring for accessing setting values
Browse files Browse the repository at this point in the history
PR-URL: #50609
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
yedlosh authored and UlisesGascon committed Dec 11, 2023
1 parent 40bbffa commit a376284
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-http2-session-settings.js
Expand Up @@ -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}`
}
);
});
Expand Down

0 comments on commit a376284

Please sign in to comment.