Skip to content

Instantly share code, notes, and snippets.

@shigeya
Created May 24, 2021 14:42
Show Gist options
  • Select an option

  • Save shigeya/ffbd5b07c754eab2edac5dbf7baab525 to your computer and use it in GitHub Desktop.

Select an option

Save shigeya/ffbd5b07c754eab2edac5dbf7baab525 to your computer and use it in GitHub Desktop.
PASS suites/did-identifier/did-identifier.spec.js
PASS suites/did-url-dereferencing/did-url-dereferencing.spec.js
FAIL suites/did-consumption/did-consumption.spec.js
● 6.x Consumption - did:unisot - @unisot/unisot-did-resolverer - UNISOT AS › IMPLEMENTATION ::@unisot/unisot-did-resolverer:: › 6.3.2 JSON-LD Consumption › did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7 › 6.3.2 JSON-LD Consumption - The DID document and any DID document data structures expressed by a JSON-LD representation MUST be deserialized into the data model according to the JSON representation consumption rules as defined in § 6.2 JSON.
expect(received).toEqual(expected) // deep equality
- Expected - 26
+ Received + 13
Object {
- "@context": Array [
- "https://www.w3.org/ns/did/v1",
- "https://w3id.org/security/v1",
- ],
+ "@context": "https://www.w3.org/ns/did/v1",
"assertionMethod": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
"authentication": Array [
- "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
"capabilityDelegation": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
"capabilityInvocation": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
- "controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "created": "2021-05-17T09:21:38.612Z",
"id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
"keyAgreement": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
- },
- ],
- "service": Array [
- Object {
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#vcs",
- "serviceEndpoint": "https://service.example.com/vc",
- "type": "VerifiableCredentialService",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
"verificationMethod": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
}
12 | 'representation consumption rules as defined in § 6.2 JSON.', async () => {
13 | const consumedDidDocument = JSON.parse(representation);
> 14 | expect(didDocument).toEqual(consumedDidDocument);
| ^
15 | });
16 | }
17 |
at Object.<anonymous> (suites/did-consumption/did-jsonld-consumption.js:14:27)
● 6.x Consumption - did:vaa - DID IS Test Suite - CAICT › IMPLEMENTATION ::DID IS Test Suite:: › 6.3.2 JSON-LD Consumption › did:vaa:2H9XwzRXZ1o5ZwSoYDEZn24eHXcQ › 6.3.2 JSON-LD Consumption - The DID document and any DID document data structures expressed by a JSON-LD representation MUST be deserialized into the data model according to the JSON representation consumption rules as defined in § 6.2 JSON.
expect(received).toEqual(expected) // deep equality
- Expected - 13
+ Received + 7
@@ -1,20 +1,15 @@
Object {
- "@context": "https://www.w3.org/2019/did/v1",
- "controllor": "did:vaa:3wJVWDQWtDFx27FqvSqyo5xsTsxC",
- "created": "2020-11-25T18:23:33Z",
- "id": "did:vaa:3wJVWDQWtDFx27FqvSqyo5xsTsxC",
- "proof": Object {
- "created": "2020-11-25T18:23:33Z",
- "signatureValue": "Tov28noNERDLNfvY1QHnS4zUYXJjLy1oiXXYb533wkq77rfdzy77/vRfBKVAt7iNY1GjpL5tytZpmPjYFLDFwz6SOdlsuCrKTM8sIGLybRS12EOWZl7PAfdYPwknpG4aK7Zmvc7u9ORN9o+YLTK3rP9H4GyJpYWUScy3S3YZU6A=",
- "type": "RsaSignature2018",
- "verificationMethod": "did:vaa:3wJVWDQWtDFx27FqvSqyo5xsTsxC#key1",
- },
+ "@context": Array [
+ "https://www.w3.org/ns/did/v1",
+ ],
+ "controllor": "did:vaa:2H9XwzRXZ1o5ZwSoYDEZn24eHXcQ",
+ "id": "did:vaa:2H9XwzRXZ1o5ZwSoYDEZn24eHXcQ",
"publicKey": Array [
Object {
- "controller": "did:vaa:3wJVWDQWtDFx27FqvSqyo5xsTsxC",
- "id": "did:vaa:3wJVWDQWtDFx27FqvSqyo5xsTsxC#key1",
+ "controller": "did:vaa:2H9XwzRXZ1o5ZwSoYDEZn24eHXcQ",
+ "id": "did:vaa:2H9XwzRXZ1o5ZwSoYDEZn24eHXcQ#key1",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDb/A4iQ0Lq6NU9Q3i91vbqZ8jh
Uj/Hr64683e9NvNkFBeFePp7wfuZJRSTMrllP5LEQwXPmeZzQBJjKkY34iQV7EXA
ARKMisvqUR/ucU1mj7ZCiFM+MNCcxn+eD1WfBsXMYfne/BPJPhIUfjjIzBaTQuhI
tLhGD6WrDv6fovK/GQIDAQAB
@@ -28,7 +23,6 @@
"id": "did:vaa:3wJVWDQWtDFx27FqvSqyo5xsTsxC#resolver",
"serviceEndpoint": "https://www.citln.cn",
"type": "DIDResolve",
},
],
- "updated": "2020-11-25T18:23:33Z",
}
12 | 'representation consumption rules as defined in § 6.2 JSON.', async () => {
13 | const consumedDidDocument = JSON.parse(representation);
> 14 | expect(didDocument).toEqual(consumedDidDocument);
| ^
15 | });
16 | }
17 |
at Object.<anonymous> (suites/did-consumption/did-jsonld-consumption.js:14:27)
FAIL suites/did-production/did-production.spec.js
● suites/did-production › IMPLEMENTATION ::@unisot/unisot-did-resolverer:: › 6.1 Production › did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7 › application/did+json › 6.1 Production and Consumption - A conforming producer MUST serialize all entries in the DID document data model, and the representation-specific entries map, that do not have explicit processing rules for the representation being produced using only the representation's data type processing rules and return the serialization after the production process completes.
expect(received).toEqual(expected) // deep equality
- Expected - 26
+ Received + 12
Object {
- "@context": Array [
- "https://www.w3.org/ns/did/v1",
- "https://w3id.org/security/v1",
- ],
"assertionMethod": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
"authentication": Array [
- "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
"capabilityDelegation": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
"capabilityInvocation": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
- "controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "created": "2021-05-17T09:21:38.612Z",
"id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
"keyAgreement": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
- },
- ],
- "service": Array [
- Object {
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#vcs",
- "serviceEndpoint": "https://service.example.com/vc",
- "type": "VerifiableCredentialService",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
"verificationMethod": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
}
28 | const dataModel = {...dmRse, ...dmProperties};
29 | const parsedDataModel = JSON.parse(representation);
> 30 | expect(dataModel).toEqual(parsedDataModel);
| ^
31 | } else {
32 | throw new Error('Unknown producer for content-type: '+ contentType);
33 | }
at Object.<anonymous> (suites/did-production/did-producer.js:30:29)
● suites/did-production › IMPLEMENTATION ::@unisot/unisot-did-resolverer:: › 6.1 Production › did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7 › application/did+ld+json › 6.1 Production and Consumption - A conforming producer MUST serialize all entries in the DID document data model, and the representation-specific entries map, that do not have explicit processing rules for the representation being produced using only the representation's data type processing rules and return the serialization after the production process completes.
expect(received).toEqual(expected) // deep equality
- Expected - 26
+ Received + 13
Object {
- "@context": Array [
- "https://www.w3.org/ns/did/v1",
- "https://w3id.org/security/v1",
- ],
+ "@context": "https://www.w3.org/ns/did/v1",
"assertionMethod": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
"authentication": Array [
- "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
"capabilityDelegation": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
"capabilityInvocation": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
- "controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "created": "2021-05-17T09:21:38.612Z",
"id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
"keyAgreement": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
- },
- ],
- "service": Array [
- Object {
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#vcs",
- "serviceEndpoint": "https://service.example.com/vc",
- "type": "VerifiableCredentialService",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
"verificationMethod": Array [
Object {
"controller": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7",
- "type": "EcdsaSecp256k1VerificationKey2019",
+ "id": "did:unisot:test:mtF5XVLJvXEeffY8fo2eUfpXqs9CqQzpj7#Key1",
+ "type": "EcdsaSecp256k1Signature2019",
},
],
}
28 | const dataModel = {...dmRse, ...dmProperties};
29 | const parsedDataModel = JSON.parse(representation);
> 30 | expect(dataModel).toEqual(parsedDataModel);
| ^
31 | } else {
32 | throw new Error('Unknown producer for content-type: '+ contentType);
33 | }
at Object.<anonymous> (suites/did-production/did-producer.js:30:29)
● suites/did-production › IMPLEMENTATION ::DID IS Test Suite:: › 6.1 Production › did:vaa:2H9XwzRXZ1o5ZwSoYDEZn24eHXcQ › application/did+ld+json › 6.1 Production and Consumption - A conforming producer MUST serialize all entries in the DID document data model, and the representation-specific entries map, that do not have explicit processing rules for the representation being produced using only the representation's data type processing rules and return the serialization after the production process completes.
expect(received).toEqual(expected) // deep equality
- Expected - 13
+ Received + 7
@@ -1,20 +1,15 @@
Object {
- "@context": "https://www.w3.org/2019/did/v1",
- "controllor": "did:vaa:3wJVWDQWtDFx27FqvSqyo5xsTsxC",
- "created": "2020-11-25T18:23:33Z",
- "id": "did:vaa:3wJVWDQWtDFx27FqvSqyo5xsTsxC",
- "proof": Object {
- "created": "2020-11-25T18:23:33Z",
- "signatureValue": "Tov28noNERDLNfvY1QHnS4zUYXJjLy1oiXXYb533wkq77rfdzy77/vRfBKVAt7iNY1GjpL5tytZpmPjYFLDFwz6SOdlsuCrKTM8sIGLybRS12EOWZl7PAfdYPwknpG4aK7Zmvc7u9ORN9o+YLTK3rP9H4GyJpYWUScy3S3YZU6A=",
- "type": "RsaSignature2018",
- "verificationMethod": "did:vaa:3wJVWDQWtDFx27FqvSqyo5xsTsxC#key1",
- },
+ "@context": Array [
+ "https://www.w3.org/ns/did/v1",
+ ],
+ "controllor": "did:vaa:2H9XwzRXZ1o5ZwSoYDEZn24eHXcQ",
+ "id": "did:vaa:2H9XwzRXZ1o5ZwSoYDEZn24eHXcQ",
"publicKey": Array [
Object {
- "controller": "did:vaa:3wJVWDQWtDFx27FqvSqyo5xsTsxC",
- "id": "did:vaa:3wJVWDQWtDFx27FqvSqyo5xsTsxC#key1",
+ "controller": "did:vaa:2H9XwzRXZ1o5ZwSoYDEZn24eHXcQ",
+ "id": "did:vaa:2H9XwzRXZ1o5ZwSoYDEZn24eHXcQ#key1",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDb/A4iQ0Lq6NU9Q3i91vbqZ8jh
Uj/Hr64683e9NvNkFBeFePp7wfuZJRSTMrllP5LEQwXPmeZzQBJjKkY34iQV7EXA
ARKMisvqUR/ucU1mj7ZCiFM+MNCcxn+eD1WfBsXMYfne/BPJPhIUfjjIzBaTQuhI
tLhGD6WrDv6fovK/GQIDAQAB
@@ -28,7 +23,6 @@
"id": "did:vaa:3wJVWDQWtDFx27FqvSqyo5xsTsxC#resolver",
"serviceEndpoint": "https://www.citln.cn",
"type": "DIDResolve",
},
],
- "updated": "2020-11-25T18:23:33Z",
}
28 | const dataModel = {...dmRse, ...dmProperties};
29 | const parsedDataModel = JSON.parse(representation);
> 30 | expect(dataModel).toEqual(parsedDataModel);
| ^
31 | } else {
32 | throw new Error('Unknown producer for content-type: '+ contentType);
33 | }
at Object.<anonymous> (suites/did-production/did-producer.js:30:29)
FAIL suites/did-core-properties/did-core-properties.spec.js
● suites/did-core-properties › IMPLEMENTATION ::DID Orb Test Suite:: › 5.x Core Properties - did:orb - DID Orb Test Suite - SecureKey › did:orb:ipfs:QmS4ZME5uEPtQ2DFDwhSZYtLxzFxCYjJ6kC7o3ypwanzFm:EiACG5GI9dK1fjnCMYMA6ZFhtP75HVhunEuqW-XDCAU7Ew › application/did+ld+json › 5.2 Verification Methods - The publicKeyJwk property is OPTIONAL. If present, the value MUST be a map representing a JSON Web Key that conforms to [RFC7517].
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
116 | const {publicKeyJwk} = vm;
117 | if(publicKeyJwk) {
> 118 | expect(isValidJwk(publicKeyJwk)).toBe(true);
| ^
119 | }
120 | });
121 | });
at forEach (suites/did-core-properties/did-core-properties.js:118:44)
at Array.forEach (<anonymous>)
at Object.<anonymous> (suites/did-core-properties/did-core-properties.js:115:27)
FAIL suites/did-resolution/did-resolution.spec.js
● suites/did-resolution › IMPLEMENTATION ::Universal Resolver:: › 7.1.x DID Resolution - Universal Resolver - Decentralized Identity Foundation and Contributors › did:ccp:3CzQLF3qfFVQ1CjGVzVRZaFXrjAd › PARAMETER expected outcome: defaultOutcomes › DID Document Metadata › created › 7.1.3 DID Document Metadata - The value of the property MUST be a string formatted as an XML Datetime normalized to UTC 00:00:00 and without sub-second decimal precision.
expect(received).toBeDidCoreDatetime()
Expected value to be of a valid DID Core Datetime:
"a valid DID Core Datetime"
Received:
"2019-10-23T09:14:17.961Z"
185 | if (didDocumentMetadata.hasOwnProperty('created')) {
186 | it('7.1.3 DID Document Metadata - The value of the property MUST be a string formatted as an XML Datetime normalized to UTC 00:00:00 and without sub-second decimal precision.', async () => {
> 187 | expect(didDocumentMetadata['created']).toBeDidCoreDatetime();
| ^
188 | });
189 | }
190 | });
at Object.<anonymous> (suites/did-resolution/did-resolution.js:187:48)
● suites/did-resolution › IMPLEMENTATION ::Universal Resolver:: › 7.1.x DID Resolution - Universal Resolver - Decentralized Identity Foundation and Contributors › did:ccp:3CzQLF3qfFVQ1CjGVzVRZaFXrjAd › PARAMETER expected outcome: defaultOutcomes › DID Document Metadata › updated › 7.1.3 DID Document Metadata - The value of the property MUST follow the same formatting rules as the created property.
expect(received).toBeDidCoreDatetime()
Expected value to be of a valid DID Core Datetime:
"a valid DID Core Datetime"
Received:
"2019-10-23T09:14:17.961Z"
192 | if (didDocumentMetadata.hasOwnProperty('updated')) {
193 | it('7.1.3 DID Document Metadata - The value of the property MUST follow the same formatting rules as the created property.', async () => {
> 194 | expect(didDocumentMetadata['updated']).toBeDidCoreDatetime();
| ^
195 | });
196 | if (didDocumentMetadata.hasOwnProperty('created')) {
197 | it('7.1.3 DID Document Metadata - updated is later or equal than created.', async () => {
at Object.<anonymous> (suites/did-resolution/did-resolution.js:194:48)
● suites/did-resolution › IMPLEMENTATION ::Universal Resolver:: › 7.1.x DID Resolution - Universal Resolver - Decentralized Identity Foundation and Contributors › did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw › PARAMETER expected outcome: defaultOutcomes › DID Document Metadata › created › 7.1.3 DID Document Metadata - The value of the property MUST be a string formatted as an XML Datetime normalized to UTC 00:00:00 and without sub-second decimal precision.
expect(received).toBeDidCoreDatetime()
Expected value to be of a valid DID Core Datetime:
"a valid DID Core Datetime"
Received:
"2019-10-21T11:12:13.065Z"
185 | if (didDocumentMetadata.hasOwnProperty('created')) {
186 | it('7.1.3 DID Document Metadata - The value of the property MUST be a string formatted as an XML Datetime normalized to UTC 00:00:00 and without sub-second decimal precision.', async () => {
> 187 | expect(didDocumentMetadata['created']).toBeDidCoreDatetime();
| ^
188 | });
189 | }
190 | });
at Object.<anonymous> (suites/did-resolution/did-resolution.js:187:48)
● suites/did-resolution › IMPLEMENTATION ::Universal Resolver:: › 7.1.x DID Resolution - Universal Resolver - Decentralized Identity Foundation and Contributors › did:ccp:ceNobbK6Me9F5zwyE3MKY88QZLw › PARAMETER expected outcome: defaultOutcomes › DID Document Metadata › updated › 7.1.3 DID Document Metadata - The value of the property MUST follow the same formatting rules as the created property.
expect(received).toBeDidCoreDatetime()
Expected value to be of a valid DID Core Datetime:
"a valid DID Core Datetime"
Received:
"2019-10-21T11:17:49.379Z"
192 | if (didDocumentMetadata.hasOwnProperty('updated')) {
193 | it('7.1.3 DID Document Metadata - The value of the property MUST follow the same formatting rules as the created property.', async () => {
> 194 | expect(didDocumentMetadata['updated']).toBeDidCoreDatetime();
| ^
195 | });
196 | if (didDocumentMetadata.hasOwnProperty('created')) {
197 | it('7.1.3 DID Document Metadata - updated is later or equal than created.', async () => {
at Object.<anonymous> (suites/did-resolution/did-resolution.js:194:48)
Test Suites: 4 failed, 2 passed, 6 total
Tests: 10 failed, 33 todo, 2889 passed, 2932 total
Snapshots: 0 total
Time: 5.168 s
Ran all test suites.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment