Skip to content

Commit

Permalink
Replacing for instead of foreach GHC23
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannahjef committed Sep 22, 2023
1 parent e329a11 commit c921332
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/parallel/test-tls-ecdh-multiple.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ const server = tls.createServer(options, (conn) => {
];

// Brainpool is not supported in FIPS mode.
if (common.hasFipsCrypto)
unsupportedCurves.push('brainpoolP256r1');

unsupportedCurves.forEach((ecdhCurve) => {
assert.throws(() => tls.createServer({ ecdhCurve }),
/Error: Failed to set ECDH curve/);
});
if (common.hasFipsCrypto) unsupportedCurves.push('brainpoolP256r1');
for (const ecdhCurve of unsupportedCurves) {
assert.throws(
() => tls.createServer({ ecdhCurve }),
/Error: Failed to set ECDH curve/
);
}
}

0 comments on commit c921332

Please sign in to comment.