From 57c64550ccb5b8dc2386bda5f470dd7c5ec1a7a7 Mon Sep 17 00:00:00 2001 From: Chiara Ricciardi Date: Fri, 22 Dec 2023 07:18:31 +0100 Subject: [PATCH] test: replace forEach with for-of in test-webcrypto-export-import-ec PR-URL: https://github.com/nodejs/node/pull/51249 Reviewed-By: Marco Ippolito Reviewed-By: Rafael Gonzaga Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- test/parallel/test-webcrypto-export-import-ec.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-webcrypto-export-import-ec.js b/test/parallel/test-webcrypto-export-import-ec.js index 2bb9173ec857ff..d0548f56662f94 100644 --- a/test/parallel/test-webcrypto-export-import-ec.js +++ b/test/parallel/test-webcrypto-export-import-ec.js @@ -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());