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
2023-10-07 16:07:26 +05:30
committed by GitHub
parent 24492476a7
commit fce8fbadcd

View File

@@ -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', {