Skip to content

Commit

Permalink
Link to text for section 4.10 Status.
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBlueHat committed Jun 6, 2024
1 parent a34445f commit 736957a
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions tests/10-vcdm2.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,19 @@ describe('Verifiable Credentials Data Model v2.0', function() {
// TODO: add enveloped proof test
});

// 4.10 Status https://w3c.github.io/vc-data-model/#status
// @link https://w3c.github.io/vc-data-model/#status:~:text=credential%20status%20object.-,If%20present%2C%20the%20normative%20guidance%20in%20Section%204.3%20Identifiers%20MUST%20be%20followed.,-type
reportRow('If present (credentialStatus.id), the normative guidance ' +
'in Section 4.3 Identifiers MUST be followed.', async function() {
// id is optional
await endpoints.issue(require(
'./input/credential-status-missing-id-ok.json'));
await assert.rejects(endpoints.issue(require(
'./input/credential-status-multiple-id-fail.json')));
await assert.rejects(endpoints.issue(require(
'./input/credential-status-nonurl-id-fail.json')));
});
// @link https://w3c.github.io/vc-data-model/#status:~:text=The%20type%20property%20is%20REQUIRED.%20It%20is%20used%20to%20express%20the%20type%20of%20status%20information%20expressed%20by%20the%20object.%20The%20related%20normative%20guidance%20in%20Section%204.4%20Types%20MUST%20be%20followed.
reportRow('(If a credentialStatus property is present), The type ' +
'property is REQUIRED. It is used to express the type of status ' +
'information expressed by the object. The related normative ' +
Expand All @@ -499,16 +512,12 @@ describe('Verifiable Credentials Data Model v2.0', function() {
await endpoints.issue(require(
'./input/credential-status-ok.json'));
});
reportRow('If present (credentialStatus.id), the normative guidance ' +
'in Section 4.3 Identifiers MUST be followed.', async function() {
// id is optional
await endpoints.issue(require(
'./input/credential-status-missing-id-ok.json'));
await assert.rejects(endpoints.issue(require(
'./input/credential-status-multiple-id-fail.json')));
await assert.rejects(endpoints.issue(require(
'./input/credential-status-nonurl-id-fail.json')));
});
// @link https://w3c.github.io/vc-data-model/#status:~:text=Status%20schemes%20MUST%20NOT%20be%20implemented%20in%20ways%20that%20enable%20tracking%20of%20individuals
it.skip('Status schemes MUST NOT be implemented in ways that enable ' +
'tracking of individuals', async function() {
// not testable with automation

Check failure on line 518 in tests/10-vcdm2.js

View workflow job for this annotation

GitHub Actions / lint (20.x)

Expected indentation of 8 spaces but found 10
});

Check failure on line 519 in tests/10-vcdm2.js

View workflow job for this annotation

GitHub Actions / lint (20.x)

Expected indentation of 6 spaces but found 8

reportRow('In Verifiable Presentations, the verifiableCredential ' +
'property MAY be present. The value MUST be an array of one or more ' +
'verifiable credential graphs in a cryptographically verifiable ' +
Expand Down

0 comments on commit 736957a

Please sign in to comment.