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
  • Loading branch information
Ospite Privilegiato committed Nov 18, 2023
1 parent a628dda commit 2d73fd9
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 2d73fd9

Please sign in to comment.