Skip to content

Commit

Permalink
test: replace forEach() with for...of
Browse files Browse the repository at this point in the history
Replace `forEach()` with `for...of` in in test-dgram-socket-buffer-size.

PR-URL: #49794
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Ram1607 authored and UlisesGascon committed Dec 11, 2023
1 parent f885dfe commit deb0351
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/parallel/test-dgram-socket-buffer-size.js
Expand Up @@ -93,15 +93,14 @@ function getExpectedError(type) {
const socket = dgram.createSocket('udp4');

socket.bind(common.mustCall(() => {
badBufferSizes.forEach((badBufferSize) => {
for (const badBufferSize of badBufferSizes) {
assert.throws(() => {
socket.setRecvBufferSize(badBufferSize);
}, errorObj);

assert.throws(() => {
socket.setSendBufferSize(badBufferSize);
}, errorObj);
});
}
socket.close();
}));
}
Expand Down

0 comments on commit deb0351

Please sign in to comment.