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 <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
  • Loading branch information
iannonoss authored and RafaelGSS committed Jan 2, 2024
1 parent b6f232e commit 7e98349
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 7e98349

Please sign in to comment.