This is the test suite for the W3C Controlled Identifiers (CIDs) v1.0 specification.
This test suite provides conformity tests for identifiers that support the W3C Controlled Identifiers (CIDs) v1.0.
npm i
Have a W3C Controlled Identifiers (CIDs) v1.0 document available on the web. The test-suite will do a GET request on the provided endpoint and assert the response.
npm test
To test a single implementation or endpoint running locally, you can
copy localConfig.example.cjs
to localConfig.cjs
in the root directory of the test suite.
cp localConfig.example.cjs localConfig.cjs
This file must be a CommonJS module that exports an object containing a
settings
object (for configuring the test suite code itself) and an
implementations
array (for configuring the implementation(s) to test against).
The format of the object contained in the implementations
array is
identical to the one defined in
the Testing locally section of VC Test Suite Implementations.
The implementations
array may contain more than one implementation object,
enabling you to test multiple implementations in one run.
// localConfig.cjs defines local implementations
module.exports = {
implementations: [{
name: 'My Company',
implementation: 'My Implementation Name',
identifiers: [{
id: 'https://example.com',
endpoint: 'https://example.com',
tags: ['cid']
}]
}];
To add your implementation to this test suite, add a test manifest describing
your implementation to the
w3c/vc-test-suite-implementations
repo by following the
Adding a new implementation
instructions.
All endpoints will need the tag cid
. A simplified manifest will roughly
look like the following:
{
"name": "My Company",
"implementation": "My implementation",
"identifiers": [{
"id": "https://example.com",
"endpoint": "https://example.com",
"tags": ["cid"]
}]
}
The endpoint should return the CID, and the id
value of the implementation should match the base identifier of the document.
See Adding a new implementation for more information.
See the CONTRIBUTING.md file in the w3c/vc-test-suite-implementations
repo.
Pull Requests are welcome!