Skip to content

Commit

Permalink
test: improve test-webcrypto-keygen.js legibility
Browse files Browse the repository at this point in the history
  • Loading branch information
SaiHemanth-uab committed Sep 26, 2023
1 parent e329a11 commit d6557f6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions test/parallel/test-webcrypto-keygen.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,7 @@ const vectors = {
{ message: /Usages cannot be empty/ });
}

const invalidUsages = [];
allUsages.forEach((usage) => {
if (!vectors[name].usages.includes(usage))
invalidUsages.push(usage);
});
const invalidUsages = allUsages.filter(usage => !vectors[name].usages.includes(usage));
for (const invalidUsage of invalidUsages) {
await assert.rejects(
subtle.generateKey(
Expand Down

0 comments on commit d6557f6

Please sign in to comment.