Skip to content

Commit

Permalink
Replace another VP test with actual test data.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Sep 19, 2024
1 parent 3328838 commit c9ac2e9
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/413-verifiable-presentations.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,24 @@ describe('Verifiable Presentations', function() {
const presentationValidId = await createLocalVp({
presentation: require('./input/presentation-id-ok.json')
});
await assert.doesNotReject(endpoints.verifyVp(presentationValidId));
await assert.doesNotReject(
endpoints.verifyVp(presentationValidId),
`Expected verifier ${name} to verify a VP with a valid id.`
);
});

it('The type property MUST be present. One value of this property MUST ' +
'be VerifiablePresentation, but additional types MAY be included.' +
'The related normative guidance in Section 4.5 Types MUST be followed.',
async function() {
this.test.link = `https://w3c.github.io/vc-data-model/#verifiable-presentations:~:text=The%20type%20property%20MUST%20be%20present.%20It%20is%20used%20to%20express%20the%20type%20of%20verifiable%20presentation.%20One%20value%20of%20this%20property%20MUST%20be%20VerifiablePresentation%2C%20but%20additional%20types%20MAY%20be%20included.%20The%20related%20normative%20guidance%20in%20Section%204.5%20Types%20MUST%20be%20followed.`;
const presentationWithCredential = await createLocalVp({
const presentationWithType = await createLocalVp({
presentation: require('./input/presentation-vc-ok.json')
});
presentationWithCredential.should.have.property('type').that.contains(
'VerifiablePresentation',
'VP MUST include the `VerifiablePresentation` type value.'
await assert.doesNotReject(
endpoints.verifyVp(presentationWithType),
`Expected verifier ${name} to verify a VP with initial ` +
`type VerifiablePresentation.`
);
});

Expand Down

0 comments on commit c9ac2e9

Please sign in to comment.