test: replace forEach with for-of in test-v8-serders.js

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Mattia Iannone authored and Richard Lau committed 2024-03-25 18:14:13 +00:00
1 parent 576adc5e5b
commit d10d39e8ba
1 file changed
+2 -3
+2 -3
View File
@@ -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) {
@@ -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);
});
}
}
{