Skip to content

Commit

Permalink
test: fix webcrypto wrap unwrap tests
Browse files Browse the repository at this point in the history
Refs: #47864
PR-URL: #47876
Refs: #47864
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
panva authored and MoLow committed Jul 6, 2023
1 parent b796d35 commit 81d8d95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-webcrypto-wrap-unwrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -290,15 +290,15 @@ async function testWrapping(name, keys) {
});
});

return Promise.all(variations);
return variations;
}

(async function() {
await generateWrappingKeys();
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());

0 comments on commit 81d8d95

Please sign in to comment.