From 16d1cfd187cc563ba0d792331ce17a23f93cd72b Mon Sep 17 00:00:00 2001 From: Emmanuel Florencio Trujillo Date: Mon, 2 Nov 2026 10:19:14 -0600 Subject: [PATCH] test: convert .forEach to for...of in test-net-write-arguments.js Signed-off-by: EmmanuelFlorencioT PR-URL: https://github.com/nodejs/node/pull/67125 Reviewed-By: Ethan Arrowood Reviewed-By: Joyee Cheung --- test/parallel/test-net-write-arguments.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/test/parallel/test-net-write-arguments.js b/test/parallel/test-net-write-arguments.js index 2e2aa554320..b867c17cd1e 100644 --- a/test/parallel/test-net-write-arguments.js +++ b/test/parallel/test-net-write-arguments.js @@ -14,17 +14,7 @@ assert.throws(() => { message: 'May not write null values to stream' }); -[ - true, - false, - undefined, - 1, - 1.0, - +Infinity, - -Infinity, - [], - {}, -].forEach((value) => { +for (const value of [ true, false, undefined, 1, 1.0, +Infinity, -Infinity, [], {} ]) { const socket = net.Stream({ highWaterMark: 0 }); // We need to check the callback since 'error' will only // be emitted once per instance. @@ -36,4 +26,4 @@ assert.throws(() => { message: 'The "chunk" argument must be of type string or an instance of ' + `Buffer, TypedArray, or DataView.${common.invalidArgTypeHelper(value)}` }); -}); +};