Skip to content

Commit

Permalink
test: replace forEach with for of
Browse files Browse the repository at this point in the history
Replaced forEach with for of in test/parralel/test-crypto-getcipherinfo.js
#NodeConfEU
  • Loading branch information
jabali2004 committed Nov 7, 2023
1 parent 036c89f commit 1a345e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-crypto-getcipherinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 1a345e3

Please sign in to comment.