Skip to content

Commit

Permalink
test: replace forEach with for-of in test-v8-serders.js
Browse files Browse the repository at this point in the history
PR-URL: #50791
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
  • Loading branch information
iannonoss authored and richardlau committed Mar 25, 2024
1 parent 576adc5 commit d10d39e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/parallel/test-v8-serdes.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ const hostObject = new (internalBinding('js_stream').JSStream)();
{
const text = 'hostObjectTag';
const data = Buffer.from(text);
const arrayBufferViews = common.getArrayBufferViews(data);

// `buf` is one of `TypedArray` or `DataView`.
function testWriteRawBytes(buf) {
Expand Down Expand Up @@ -138,9 +137,9 @@ const hostObject = new (internalBinding('js_stream').JSStream)();
assert.strictEqual(des.readValue().val, hostObject);
}

arrayBufferViews.forEach((buf) => {
for (const buf of common.getArrayBufferViews(data)) {
testWriteRawBytes(buf);
});
}
}

{
Expand Down

0 comments on commit d10d39e

Please sign in to comment.