From 96907b55ebff8e1483337b069a410c946fd2cf7a Mon Sep 17 00:00:00 2001 From: CorrWu <67254464+CorrWu@users.noreply.github.com> Date: Fri, 10 Nov 2023 03:35:47 -0800 Subject: [PATCH] test: replace forEach with for of MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/49785 Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- test/parallel/test-buffer-slice.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-buffer-slice.js b/test/parallel/test-buffer-slice.js index 05cbfba4733829..52720bb87b3cea 100644 --- a/test/parallel/test-buffer-slice.js +++ b/test/parallel/test-buffer-slice.js @@ -71,9 +71,9 @@ for (let i = 0, s = buf.toString(); i < buf.length; ++i) { ); } -expectedSameBufs.forEach(([buf1, buf2]) => { +for (const [buf1, buf2] of expectedSameBufs) { assert.strictEqual(Buffer.compare(buf1, buf2), 0); -}); +} const utf16Buf = Buffer.from('0123456789', 'utf16le'); assert.deepStrictEqual(utf16Buf.slice(0, 6), Buffer.from('012', 'utf16le'));