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 <[email protected]>
  • Loading branch information
Ram1607 authored and targos committed Nov 14, 2023
1 parent f40435d commit 90833a8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/parallel/test-dgram-socket-buffer-size.js
Original file line number Diff line number Diff line change
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 90833a8

Please sign in to comment.