From a1693c669c0f8ccce68e8611d62e2f9c856a677f Mon Sep 17 00:00:00 2001 From: Niya Shiyas Date: Sat, 23 Sep 2023 11:43:54 +0530 Subject: [PATCH] test: replace forEach with for...of in test-fs-realpath-buffer-encoding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/49804 Reviewed-By: Trivikram Kamat Reviewed-By: Tobias Nießen Reviewed-By: Yongsheng Zhang Reviewed-By: James M Snell --- test/parallel/test-fs-realpath-buffer-encoding.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-fs-realpath-buffer-encoding.js b/test/parallel/test-fs-realpath-buffer-encoding.js index 481e1b0df67f04..dbf2bda2c77d23 100644 --- a/test/parallel/test-fs-realpath-buffer-encoding.js +++ b/test/parallel/test-fs-realpath-buffer-encoding.js @@ -10,9 +10,9 @@ const buffer_dir = Buffer.from(string_dir); const encodings = ['ascii', 'utf8', 'utf16le', 'ucs2', 'base64', 'binary', 'hex']; const expected = {}; -encodings.forEach((encoding) => { +for (const encoding of encodings) { expected[encoding] = buffer_dir.toString(encoding); -}); +} // test sync version