Skip to content

Commit 7e98349

Browse files
iannonossRafaelGSS
authored andcommitted
test: replace forEach with for-of in test-v8-serders.js
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>
1 parent b6f232e commit 7e98349

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/parallel/test-v8-serdes.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ const hostObject = new (internalBinding('js_stream').JSStream)();
107107
{
108108
const text = 'hostObjectTag';
109109
const data = Buffer.from(text);
110-
const arrayBufferViews = common.getArrayBufferViews(data);
111110

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

141-
arrayBufferViews.forEach((buf) => {
140+
for (const buf of common.getArrayBufferViews(data)) {
142141
testWriteRawBytes(buf);
143-
});
142+
}
144143
}
145144

146145
{

0 commit comments

Comments
 (0)