Skip to content

Commit

Permalink
Comment generator for small component count.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Oct 17, 2024
1 parent 2517791 commit 540d89d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,16 @@ export async function verifySetup({credentials, keyTypes, suite}) {
disclosed.invalid.valuePrefix = valuePrefix;
// invalid element count means less than 4 components
const componentCount = disclosed.invalid.componentCount = new Map();
// use the basic disclosed vc
for(const [keyType, versions] of disclosed?.basic) {
componentCount.set(keyType, new Map());
for(const [vcVersion, vc] of versions) {
const modifiedVc = structuredClone(vc);
const params = parseDisclosureProofValue({proof: modifiedVc.proof});
// create a payload with only 2 components
const payload = [params.bbsProof, params.presentationHeader];
// replace the existing proofValue with the smaller payload
modifiedVc.proof.proofValue = encodeProofValue({payload});
// perform test data mutation here
componentCount.get(keyType).set(vcVersion, modifiedVc);
}
}
Expand Down

0 comments on commit 540d89d

Please sign in to comment.