Skip to content

Commit

Permalink
Add test for conforming processors.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Jul 10, 2024
1 parent 92a2d4f commit 9c6de82
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/suites/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,18 @@ export function verifySuite({
const credential = cloneTestVector(disclosed?.invalid?.modified);
await verificationFail({credential, verifier});
});
it('Conforming processors MUST produce errors when non-conforming ' +
'documents are consumed.', async function() {
this.test.link = 'https://w3c.github.io/vc-di-bbs/#:~:text=Conforming%20processors%20MUST%20produce%20errors%20when%20non%2Dconforming%20documents%20are%20consumed.';
for(const [prop, vector] of Object.entries(disclosed?.invalid)) {
await verificationFail({
credential: cloneTestVector(vector),
verifier,
reason: `Verified invalid VC "${prop}" version ` +
`${vcVersion} keyType ${keyType}`
});
}
});
it('If the decodedProofValue starts with any other three byte ' +
'sequence, an error MUST be raised and SHOULD convey an error ' +
'type of PROOF_VERIFICATION_ERROR.', async function() {
Expand Down

0 comments on commit 9c6de82

Please sign in to comment.