Skip to content

Commit

Permalink
test: replace forEach with for-of in test-webcrypto-export-import-ec
Browse files Browse the repository at this point in the history
PR-URL: #51249
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
cricciardi authored and RafaelGSS committed Jan 2, 2024
1 parent 88e8651 commit 57c6455
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/parallel/test-webcrypto-export-import-ec.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,16 +363,16 @@ async function testImportRaw({ name, publicUsages }, namedCurve) {

(async function() {
const tests = [];
testVectors.forEach((vector) => {
curves.forEach((namedCurve) => {
[true, false].forEach((extractable) => {
for (const vector of testVectors) {
for (const namedCurve of curves) {
for (const extractable of [true, false]) {
tests.push(testImportSpki(vector, namedCurve, extractable));
tests.push(testImportPkcs8(vector, namedCurve, extractable));
tests.push(testImportJwk(vector, namedCurve, extractable));
});
}
tests.push(testImportRaw(vector, namedCurve));
});
});
}
}

await Promise.all(tests);
})().then(common.mustCall());
Expand Down

0 comments on commit 57c6455

Please sign in to comment.