From 43c967ed501a9ebffe0b9db7b6b27a2b26ddeda0 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Sun, 7 May 2023 12:54:20 +0200 Subject: [PATCH] test: fix webcrypto wrap unwrap tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: #47864 PR-URL: https://github.com/nodejs/node/pull/47876 Refs: https://github.com/nodejs/node/issues/47864 Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca --- test/parallel/test-webcrypto-wrap-unwrap.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-webcrypto-wrap-unwrap.js b/test/parallel/test-webcrypto-wrap-unwrap.js index eb863ea606ebce..670f19b7e4a190 100644 --- a/test/parallel/test-webcrypto-wrap-unwrap.js +++ b/test/parallel/test-webcrypto-wrap-unwrap.js @@ -275,7 +275,7 @@ async function testWrap(wrappingKey, unwrappingKey, key, wrap, format) { assert.deepStrictEqual(exported, exportedAgain); } -async function testWrapping(name, keys) { +function testWrapping(name, keys) { const variations = []; const { @@ -290,7 +290,7 @@ async function testWrapping(name, keys) { }); }); - return Promise.all(variations); + return variations; } (async function() { @@ -298,7 +298,7 @@ async function testWrapping(name, keys) { const keys = await generateKeysToWrap(); const variations = []; Object.keys(kWrappingData).forEach((name) => { - return testWrapping(name, keys); + variations.push(...testWrapping(name, keys)); }); await Promise.all(variations); })().then(common.mustCall());