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 <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
yedlosh authored and targos committed Nov 14, 2023
1 parent 14e3675 commit 8be718a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-http2-session-settings.js
Original file line number Diff line number Diff line change
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 8be718a

Please sign in to comment.