From 8dd895e5740c4d7007943e34e48e1d68c2d8e532 Mon Sep 17 00:00:00 2001 From: Niya Shiyas <98641481+niyashiyas@users.noreply.github.com> Date: Sat, 7 Oct 2023 16:07:26 +0530 Subject: [PATCH] test: replace forEach with for..of in test-process-env MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/49825 Reviewed-By: Luigi Pinca Reviewed-By: Tobias Nießen --- test/parallel/test-process-env-ignore-getter-setter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-process-env-ignore-getter-setter.js b/test/parallel/test-process-env-ignore-getter-setter.js index 677960570a0bc1..e17e3752856e81 100644 --- a/test/parallel/test-process-env-ignore-getter-setter.js +++ b/test/parallel/test-process-env-ignore-getter-setter.js @@ -40,7 +40,7 @@ assert.throws( const attributes = ['configurable', 'writable', 'enumerable']; -attributes.forEach((attribute) => { +for (const attribute of attributes) { assert.throws( () => { Object.defineProperty(process.env, 'goo', { @@ -55,7 +55,7 @@ attributes.forEach((attribute) => { ' and enumerable data descriptor' } ); -}); +} assert.strictEqual(process.env.goo, undefined); Object.defineProperty(process.env, 'goo', {