test: replace forEach with for of

PR-URL: https://github.com/nodejs/node/pull/50597
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
Kevin Kühnemund authored and GitHub committed 2023-11-10 11:35:59 +00:00
1 parent a5a6fef0db
commit 38cd4f7d51
1 file changed
+2 -2
+2 -2
View File
@@ -16,12 +16,12 @@ const ciphers = getCiphers();
assert.strictEqual(getCipherInfo(-1), undefined);
assert.strictEqual(getCipherInfo('cipher that does not exist'), undefined);
ciphers.forEach((cipher) => {
for (const cipher of ciphers) {
const info = getCipherInfo(cipher);
assert(info);
const info2 = getCipherInfo(info.nid);
assert.deepStrictEqual(info, info2);
});
}
const info = getCipherInfo('aes-128-cbc');
assert.strictEqual(info.name, 'aes-128-cbc');