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 marco-ippolito committed Dec 21, 2023
1 parent 2df38b0 commit 5bbd1f7
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 5bbd1f7

Please sign in to comment.