mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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:
1 parent
576adc5e5b
commit
d10d39e8ba
1 file changed
+2
-3
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user