test: replace forEach with for..of in test-net-isipv4.js

PR-URL: https://github.com/nodejs/node/pull/49822
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
Niya Shiyas 2023-10-21 18:02:43 +05:30 committed by GitHub
parent c38ba67a0d
commit b084b26c44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,10 +37,10 @@ const v4not = [
'192.168.0.2000000000',
];
v4.forEach((ip) => {
for (const ip of v4) {
assert.strictEqual(net.isIPv4(ip), true);
});
}
v4not.forEach((ip) => {
for (const ip of v4not) {
assert.strictEqual(net.isIPv4(ip), false);
});
}