test: replace forEach with for..of in test-process-env

PR-URL: https://github.com/nodejs/node/pull/49825
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
Niya Shiyas authored and GitHub committed 2023-10-07 10:37:26 +00:00
1 parent 24492476a7
commit fce8fbadcd
1 file changed
+2 -2
@@ -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', {