Skip to content
/ node Public
forked from nodejs/node

Commit

Permalink
test: fix webcrypto wrap unwrap tests
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed May 5, 2023
1 parent 46c3f4d commit aa92e11
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 aa92e11

Please sign in to comment.