From 53c436c6e18224503ff88a09d55f0fcdd169410b Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Thu, 12 Sep 2024 13:42:18 -0400 Subject: [PATCH 01/20] Add test for error highlight. --- test/highlight-matrix.json | 3288 ++++++++++++++++++++++++++++++++++++ test/mocha/10-render.js | 13 +- test/mock-data.js | 1 + 3 files changed, 3301 insertions(+), 1 deletion(-) create mode 100644 test/highlight-matrix.json diff --git a/test/highlight-matrix.json b/test/highlight-matrix.json new file mode 100644 index 0000000..16d883c --- /dev/null +++ b/test/highlight-matrix.json @@ -0,0 +1,3288 @@ +{ + "title": "", + "ctx": null, + "suites": [ + { + "title": "Issue Credential - Data Integrity", + "ctx": null, + "suites": [ + { + "title": "Danube Tech", + "ctx": null, + "suites": [], + "tests": [ + { + "type": "test", + "title": "MUST successfully issue a credential.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const {result, data: issuedVc, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.exist(issuedVc, 'Expected result to have data.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n testIssuedVc({issuedVc});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:7d556c3e-3a4a-48da-bb11-a357c4ddb7f9", + "_events": {}, + "_eventsCount": 1, + "link": "https://example.com/", + "cell": { + "columnId": "Danube Tech", + "rowId": "MUST successfully issue a credential." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 553, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 516, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "Request body MUST have property \"credential\".", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.verifiableCredential = {...body.credential};\n delete body.credential;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:b0a4506b-6afb-4715-90a0-710bd0b988fc", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "Request body MUST have property \"credential\"." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 1069, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 380, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"@context\".", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential['@context'];\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:e6d4cb11-aabd-4604-962b-e3b926c4c2f9", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential MUST have property \"@context\"." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 1452, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 375, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential \"@context\" MUST be an array.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential['@context'] = 4;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:c3751cd2-d249-4f6d-9106-2e97371661e9", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential \"@context\" MUST be an array." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 1828, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 383, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential \"@context\" items MUST be strings.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidContextTypes = [{foo: true}, 4, false, null];\n for(const invalidContextType of invalidContextTypes) {\n body.credential['@context'] = invalidContextType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:8e980cf9-b997-4dfe-afc6-887707719a08", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential \"@context\" items MUST be strings." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 2212, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 1490, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"type\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.type;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:1a9c26a9-f871-4f95-8f9e-e13a231e9c50", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential MUST have property \"type\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 3703, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 376, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.type\" MUST be an array.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential.type = 4;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:1aa3aad5-3a99-4ad3-acc6-f451b42ea2a0", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "\"credential.type\" MUST be an array." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 4081, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 356, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.type\" items MUST be strings", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidCredentialTypes = [null, true, 4, []];\n for(const invalidCredentialType of invalidCredentialTypes) {\n body.credential.type = invalidCredentialType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:1c96ffff-20d3-46ff-bcfd-da67b9ef4c80", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "\"credential.type\" items MUST be strings" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 4440, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 1523, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"issuer\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.issuer;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:0c843466-4006-43fd-8d09-da6192355e07", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential MUST have property \"issuer\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 5964, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 385, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.issuer\" MUST be a string or an object", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidIssuerTypes = [null, true, 4, []];\n for(const invalidIssuerType of invalidIssuerTypes) {\n body.credential.issuer = invalidIssuerType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:07f5ac26-f344-45bc-bb6c-608f990430d0", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "\"credential.issuer\" MUST be a string or an object" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 6349, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 724, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected status code 400 invalid input!: expected 500 to equal 400", + "showDiff": true, + "actual": "500", + "expected": "400", + "operator": "strictEqual", + "stack": "AssertionError: Expected status code 400 invalid input!: expected 500 to equal 400\n at shouldThrowInvalidInput (tests/assertions.js:16:23)\n at Context. (tests/10-issuer.js:142:11)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "credential MUST have property \"credentialSubject\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.credentialSubject;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:126b630a-c39f-4c5f-95ff-7050a5b815e5", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential MUST have property \"credentialSubject\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 7082, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 372, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.credentialSubject\" MUST be an object", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidCredentialSubjectTypes = [null, true, 4, []];\n for(const invalidCredentialSubjectType of\n invalidCredentialSubjectTypes) {\n body.credential.credentialSubject = invalidCredentialSubjectType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:9466a465-e7b9-4e54-9bd1-cbafd9546579", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "\"credential.credentialSubject\" MUST be an object" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 7455, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 1470, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MAY have property \"issuanceDate\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential.issuanceDate = new Date().toISOString()\n .replace('.000Z', 'Z');\n const {result, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:aeef637e-2e7f-49cf-a9cb-eff433d838c5", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential MAY have property \"issuanceDate\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 8926, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 454, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MAY have property \"expirationDate\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n // expires in a year\n const oneYear = Date.now() + 365 * 24 * 60 * 60 * 1000;\n body.credential.expirationDate = new Date(oneYear).toISOString()\n .replace('.000Z', 'Z');\n const {result, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:534e361a-f1c1-44b4-bf37-115759d5d1ab", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential MAY have property \"expirationDate\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 9381, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 458, + "state": "passed", + "speed": "slow" + } + ], + "root": false, + "pending": false, + "_retries": -1, + "_beforeEach": [], + "_beforeAll": [], + "_afterEach": [], + "_afterAll": [], + "_timeout": 15000, + "_slow": 75, + "_bail": false, + "_onlyTests": [], + "_onlySuites": [], + "delayed": false, + "parent": "mFCXFvI-A8MDTOBp89KJG", + "_testId": "urn:uuid:65d8a597-4930-4659-a961-4a4189228416" + }, + { + "title": "Digital Bazaar", + "ctx": null, + "suites": [], + "tests": [ + { + "type": "test", + "title": "MUST successfully issue a credential.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const {result, data: issuedVc, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.exist(issuedVc, 'Expected result to have data.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n testIssuedVc({issuedVc});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:ac8ba57f-1e9a-4a6d-87a1-37b7e6731428", + "_events": {}, + "_eventsCount": 1, + "link": "https://example.com/", + "cell": { + "columnId": "Digital Bazaar", + "rowId": "MUST successfully issue a credential." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 9840, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 230, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "Request body MUST have property \"credential\".", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.verifiableCredential = {...body.credential};\n delete body.credential;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:aa1b46c2-a0d8-4653-83f5-52c8901cb3ff", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "Request body MUST have property \"credential\"." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 10071, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 103, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"@context\".", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential['@context'];\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:e709c0b7-0f6f-4c0b-a858-ad9bc784c30c", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential MUST have property \"@context\"." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 10175, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 101, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential \"@context\" MUST be an array.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential['@context'] = 4;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:a143cabc-f882-47da-9800-c31b51217a41", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential \"@context\" MUST be an array." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 10277, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 114, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential \"@context\" items MUST be strings.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidContextTypes = [{foo: true}, 4, false, null];\n for(const invalidContextType of invalidContextTypes) {\n body.credential['@context'] = invalidContextType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:167b74d1-015a-4492-9c5f-8b2721c65421", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential \"@context\" items MUST be strings." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 10391, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 402, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"type\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.type;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:ec3d97dd-0c7e-46f4-b97e-c0f4a7792d1c", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential MUST have property \"type\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 10793, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 88, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected status code 400 invalid input!: expected 500 to equal 400", + "showDiff": true, + "actual": "500", + "expected": "400", + "operator": "strictEqual", + "stack": "AssertionError: Expected status code 400 invalid input!: expected 500 to equal 400\n at shouldThrowInvalidInput (tests/assertions.js:16:23)\n at Context. (tests/10-issuer.js:97:9)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "\"credential.type\" MUST be an array.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential.type = 4;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:939eac5d-a2b9-4aac-8d19-3b4bbe28ea9d", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "\"credential.type\" MUST be an array." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 10884, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 94, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected status code 400 invalid input!: expected 500 to equal 400", + "showDiff": true, + "actual": "500", + "expected": "400", + "operator": "strictEqual", + "stack": "AssertionError: Expected status code 400 invalid input!: expected 500 to equal 400\n at shouldThrowInvalidInput (tests/assertions.js:16:23)\n at Context. (tests/10-issuer.js:107:9)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "\"credential.type\" items MUST be strings", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidCredentialTypes = [null, true, 4, []];\n for(const invalidCredentialType of invalidCredentialTypes) {\n body.credential.type = invalidCredentialType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:befee3ab-0503-4bba-b3da-1135def1be7c", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "\"credential.type\" items MUST be strings" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 10981, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 97, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected status code 400 invalid input!: expected 500 to equal 400", + "showDiff": true, + "actual": "500", + "expected": "400", + "operator": "strictEqual", + "stack": "AssertionError: Expected status code 400 invalid input!: expected 500 to equal 400\n at shouldThrowInvalidInput (tests/assertions.js:16:23)\n at Context. (tests/10-issuer.js:119:11)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "credential MUST have property \"issuer\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.issuer;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:a7fcf899-f79a-4f24-a280-89338ac3cf10", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential MUST have property \"issuer\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11081, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 135, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected no result from issuer.: expected Response{ size: +0, data: { …(1) }, …(2) } to not exist", + "showDiff": false, + "actual": { + "size": 0, + "data": { + "verifiableCredential": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/ed25519-2020/v1" + ], + "type": [ + "VerifiableCredential" + ], + "credentialSubject": { + "id": "did:key:z6MkhTNL7i2etLerDK8Acz5t528giE5KA4p75T6ka1E1D74r" + }, + "id": "urn:uuid:a8f0e464-d20d-4a58-aa50-c5155c95b30d", + "issuer": "did:key:z6MkkyNu8RUzvTMCkbw7HyNGPzuExz7VMbeoMtRuu9o4kGdw", + "issuanceDate": "2022-05-23T18:06:49Z", + "proof": { + "type": "Ed25519Signature2020", + "created": "2022-05-23T18:06:49Z", + "verificationMethod": "did:key:z6MkkyNu8RUzvTMCkbw7HyNGPzuExz7VMbeoMtRuu9o4kGdw#z6MkkyNu8RUzvTMCkbw7HyNGPzuExz7VMbeoMtRuu9o4kGdw", + "proofPurpose": "assertionMethod", + "proofValue": "z4gdyohH8bbRneB9xhfwXuPDoBMLBEEJ25PKvJH8x8ZJ427ATczZxnrMx2ZmMwVvSPYb6A2n2rCZd5qk3S9ubuY7J" + } + } + } + }, + "operator": "notStrictEqual", + "stack": "AssertionError: Expected no result from issuer.: expected Response{ size: +0, data: { …(1) }, …(2) } to not exist\n at Object.should.not.exist (node_modules/chai/lib/chai/interface/should.js:208:38)\n at shouldThrowInvalidInput (tests/assertions.js:11:14)\n at Context. (tests/10-issuer.js:130:9)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "\"credential.issuer\" MUST be a string or an object", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidIssuerTypes = [null, true, 4, []];\n for(const invalidIssuerType of invalidIssuerTypes) {\n body.credential.issuer = invalidIssuerType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:1328ae93-e51b-412b-80a7-38813391507c", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "\"credential.issuer\" MUST be a string or an object" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11220, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 132, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected no result from issuer.: expected Response{ size: +0, data: { …(1) }, …(2) } to not exist", + "showDiff": false, + "actual": { + "size": 0, + "data": { + "verifiableCredential": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/ed25519-2020/v1" + ], + "type": [ + "VerifiableCredential" + ], + "credentialSubject": { + "id": "did:key:z6MkhTNL7i2etLerDK8Acz5t528giE5KA4p75T6ka1E1D74r" + }, + "id": "urn:uuid:548424a4-a907-4726-a415-43771593fd21", + "issuer": { + "id": "did:key:z6MkkyNu8RUzvTMCkbw7HyNGPzuExz7VMbeoMtRuu9o4kGdw" + }, + "issuanceDate": "2022-05-23T18:06:49Z", + "proof": { + "type": "Ed25519Signature2020", + "created": "2022-05-23T18:06:49Z", + "verificationMethod": "did:key:z6MkkyNu8RUzvTMCkbw7HyNGPzuExz7VMbeoMtRuu9o4kGdw#z6MkkyNu8RUzvTMCkbw7HyNGPzuExz7VMbeoMtRuu9o4kGdw", + "proofPurpose": "assertionMethod", + "proofValue": "zGpdRb7P8mwoanaJ8vHCx9QvfqC517zgy3yR6AyRpiajegRfz8uvfx5cfVPvCZZrDgUGWeiibpZH1uiG6eSRqPem" + } + } + } + }, + "operator": "notStrictEqual", + "stack": "AssertionError: Expected no result from issuer.: expected Response{ size: +0, data: { …(1) }, …(2) } to not exist\n at Object.should.not.exist (node_modules/chai/lib/chai/interface/should.js:208:38)\n at shouldThrowInvalidInput (tests/assertions.js:11:14)\n at Context. (tests/10-issuer.js:142:11)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "credential MUST have property \"credentialSubject\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.credentialSubject;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:ca890a10-4f5f-4f48-9126-bd16946a4f6b", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential MUST have property \"credentialSubject\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11356, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 101, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected status code 400 invalid input!: expected 500 to equal 400", + "showDiff": true, + "actual": "500", + "expected": "400", + "operator": "strictEqual", + "stack": "AssertionError: Expected status code 400 invalid input!: expected 500 to equal 400\n at shouldThrowInvalidInput (tests/assertions.js:16:23)\n at Context. (tests/10-issuer.js:153:9)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "\"credential.credentialSubject\" MUST be an object", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidCredentialSubjectTypes = [null, true, 4, []];\n for(const invalidCredentialSubjectType of\n invalidCredentialSubjectTypes) {\n body.credential.credentialSubject = invalidCredentialSubjectType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:f479f61b-fa5a-4159-abfa-a8d7c0d28d05", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "\"credential.credentialSubject\" MUST be an object" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11459, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 117, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected status code 400 invalid input!: expected 500 to equal 400", + "showDiff": true, + "actual": "500", + "expected": "400", + "operator": "strictEqual", + "stack": "AssertionError: Expected status code 400 invalid input!: expected 500 to equal 400\n at shouldThrowInvalidInput (tests/assertions.js:16:23)\n at Context. (tests/10-issuer.js:166:11)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "credential MAY have property \"issuanceDate\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential.issuanceDate = new Date().toISOString()\n .replace('.000Z', 'Z');\n const {result, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:18c454b4-db18-48b3-ad4b-d42dd182f7a6", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential MAY have property \"issuanceDate\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11578, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 132, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MAY have property \"expirationDate\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n // expires in a year\n const oneYear = Date.now() + 365 * 24 * 60 * 60 * 1000;\n body.credential.expirationDate = new Date(oneYear).toISOString()\n .replace('.000Z', 'Z');\n const {result, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:2bab1950-6183-4f9e-bd23-03b3263f48db", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential MAY have property \"expirationDate\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11711, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 128, + "state": "passed", + "speed": "slow" + } + ], + "root": false, + "pending": false, + "_retries": -1, + "_beforeEach": [], + "_beforeAll": [], + "_afterEach": [], + "_afterAll": [], + "_timeout": 15000, + "_slow": 75, + "_bail": false, + "_onlyTests": [], + "_onlySuites": [], + "delayed": false, + "parent": "mFCXFvI-A8MDTOBp89KJG", + "_testId": "urn:uuid:744dba79-451b-4b21-8992-efdb48afee10" + }, + { + "title": "SecureKey", + "ctx": null, + "suites": [], + "tests": [ + { + "type": "test", + "title": "MUST successfully issue a credential.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const {result, data: issuedVc, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.exist(issuedVc, 'Expected result to have data.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n testIssuedVc({issuedVc});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:59b50b61-bece-4e8b-a8ed-5f0c5e1f9a02", + "_events": {}, + "_eventsCount": 1, + "link": "https://example.com/", + "cell": { + "columnId": "SecureKey", + "rowId": "MUST successfully issue a credential." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11843, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 122, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected result from issuer.: expected undefined to exist", + "showDiff": false, + "operator": "strictEqual", + "stack": "AssertionError: Expected result from issuer.: expected undefined to exist\n at Object.should.exist (node_modules/chai/lib/chai/interface/should.js:144:34)\n at Context. (tests/10-issuer.js:39:16)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "Request body MUST have property \"credential\".", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.verifiableCredential = {...body.credential};\n delete body.credential;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:4852e9d8-74e3-4af2-a97a-aef2c3dab4a6", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "Request body MUST have property \"credential\"." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11964, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 91, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"@context\".", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential['@context'];\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:be23d6aa-6439-4e1f-aea3-73a2790f7c94", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential MUST have property \"@context\"." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 12056, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 93, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential \"@context\" MUST be an array.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential['@context'] = 4;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:65ef9e4a-2c34-4f4e-80a7-73de11d23bc1", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential \"@context\" MUST be an array." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 12151, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 93, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential \"@context\" items MUST be strings.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidContextTypes = [{foo: true}, 4, false, null];\n for(const invalidContextType of invalidContextTypes) {\n body.credential['@context'] = invalidContextType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:f68f9d53-bc41-4f79-9fd2-0eb7e9e3e892", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential \"@context\" items MUST be strings." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 12245, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 371, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"type\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.type;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:410f12c0-0375-44b2-a289-4eb19eb5331c", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential MUST have property \"type\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 12618, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 92, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.type\" MUST be an array.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential.type = 4;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:45e16d86-9be4-4957-909c-f0f065ba0a2a", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "\"credential.type\" MUST be an array." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 12711, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 97, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.type\" items MUST be strings", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidCredentialTypes = [null, true, 4, []];\n for(const invalidCredentialType of invalidCredentialTypes) {\n body.credential.type = invalidCredentialType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:ee3b9f8b-0b5f-4f7d-9695-772b200b922d", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "\"credential.type\" items MUST be strings" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 12810, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 372, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"issuer\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.issuer;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:b6cdc865-df87-4402-94e5-39bb27e438ea", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential MUST have property \"issuer\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 13182, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 100, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.issuer\" MUST be a string or an object", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidIssuerTypes = [null, true, 4, []];\n for(const invalidIssuerType of invalidIssuerTypes) {\n body.credential.issuer = invalidIssuerType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:39a8984d-eed5-4c32-8248-5884c8f020ba", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "\"credential.issuer\" MUST be a string or an object" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 13283, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 378, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"credentialSubject\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.credentialSubject;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:2b612e97-4e8b-48c2-87bb-8018fd3c43e5", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential MUST have property \"credentialSubject\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 13662, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 96, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.credentialSubject\" MUST be an object", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidCredentialSubjectTypes = [null, true, 4, []];\n for(const invalidCredentialSubjectType of\n invalidCredentialSubjectTypes) {\n body.credential.credentialSubject = invalidCredentialSubjectType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:9761cf8a-581e-48b4-911a-b0bc19d63433", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "\"credential.credentialSubject\" MUST be an object" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 13760, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 377, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MAY have property \"issuanceDate\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential.issuanceDate = new Date().toISOString()\n .replace('.000Z', 'Z');\n const {result, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:0b1e9303-1dfe-4c96-a50c-624fdb9074f1", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential MAY have property \"issuanceDate\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 14139, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 101, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MAY have property \"expirationDate\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n // expires in a year\n const oneYear = Date.now() + 365 * 24 * 60 * 60 * 1000;\n body.credential.expirationDate = new Date(oneYear).toISOString()\n .replace('.000Z', 'Z');\n const {result, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:bd65ee1f-2ea9-471e-bae5-39f60cbebb13", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential MAY have property \"expirationDate\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 14242, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 90, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected result from issuer.: expected undefined to exist", + "showDiff": false, + "operator": "strictEqual", + "stack": "AssertionError: Expected result from issuer.: expected undefined to exist\n at Object.should.exist (node_modules/chai/lib/chai/interface/should.js:144:34)\n at Context. (tests/10-issuer.js:193:16)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + } + ], + "root": false, + "pending": false, + "_retries": -1, + "_beforeEach": [], + "_beforeAll": [], + "_afterEach": [], + "_afterAll": [], + "_timeout": 15000, + "_slow": 75, + "_bail": false, + "_onlyTests": [], + "_onlySuites": [], + "delayed": false, + "parent": "mFCXFvI-A8MDTOBp89KJG", + "_testId": "urn:uuid:6b3e2960-5655-4fb2-b318-975b59947ea9" + } + ], + "tests": [ + { + "type": "test", + "title": "MUST successfully issue a credential.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const {result, data: issuedVc, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.exist(issuedVc, 'Expected result to have data.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n testIssuedVc({issuedVc});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:7d556c3e-3a4a-48da-bb11-a357c4ddb7f9", + "_events": {}, + "_eventsCount": 1, + "link": "https://example.com/", + "cell": { + "columnId": "Danube Tech", + "rowId": "MUST successfully issue a credential." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 553, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 516, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "Request body MUST have property \"credential\".", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.verifiableCredential = {...body.credential};\n delete body.credential;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:b0a4506b-6afb-4715-90a0-710bd0b988fc", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "Request body MUST have property \"credential\"." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 1069, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 380, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"@context\".", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential['@context'];\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:e6d4cb11-aabd-4604-962b-e3b926c4c2f9", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential MUST have property \"@context\"." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 1452, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 375, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential \"@context\" MUST be an array.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential['@context'] = 4;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:c3751cd2-d249-4f6d-9106-2e97371661e9", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential \"@context\" MUST be an array." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 1828, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 383, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential \"@context\" items MUST be strings.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidContextTypes = [{foo: true}, 4, false, null];\n for(const invalidContextType of invalidContextTypes) {\n body.credential['@context'] = invalidContextType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:8e980cf9-b997-4dfe-afc6-887707719a08", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential \"@context\" items MUST be strings." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 2212, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 1490, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"type\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.type;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:1a9c26a9-f871-4f95-8f9e-e13a231e9c50", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential MUST have property \"type\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 3703, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 376, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.type\" MUST be an array.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential.type = 4;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:1aa3aad5-3a99-4ad3-acc6-f451b42ea2a0", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "\"credential.type\" MUST be an array." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 4081, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 356, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.type\" items MUST be strings", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidCredentialTypes = [null, true, 4, []];\n for(const invalidCredentialType of invalidCredentialTypes) {\n body.credential.type = invalidCredentialType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:1c96ffff-20d3-46ff-bcfd-da67b9ef4c80", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "\"credential.type\" items MUST be strings" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 4440, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 1523, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"issuer\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.issuer;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:0c843466-4006-43fd-8d09-da6192355e07", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential MUST have property \"issuer\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 5964, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 385, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.issuer\" MUST be a string or an object", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidIssuerTypes = [null, true, 4, []];\n for(const invalidIssuerType of invalidIssuerTypes) {\n body.credential.issuer = invalidIssuerType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:07f5ac26-f344-45bc-bb6c-608f990430d0", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "\"credential.issuer\" MUST be a string or an object" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 6349, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 724, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected status code 400 invalid input!: expected 500 to equal 400", + "showDiff": true, + "actual": "500", + "expected": "400", + "operator": "strictEqual", + "stack": "AssertionError: Expected status code 400 invalid input!: expected 500 to equal 400\n at shouldThrowInvalidInput (tests/assertions.js:16:23)\n at Context. (tests/10-issuer.js:142:11)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "credential MUST have property \"credentialSubject\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.credentialSubject;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:126b630a-c39f-4c5f-95ff-7050a5b815e5", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential MUST have property \"credentialSubject\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 7082, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 372, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.credentialSubject\" MUST be an object", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidCredentialSubjectTypes = [null, true, 4, []];\n for(const invalidCredentialSubjectType of\n invalidCredentialSubjectTypes) {\n body.credential.credentialSubject = invalidCredentialSubjectType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:9466a465-e7b9-4e54-9bd1-cbafd9546579", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "\"credential.credentialSubject\" MUST be an object" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 7455, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 1470, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MAY have property \"issuanceDate\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential.issuanceDate = new Date().toISOString()\n .replace('.000Z', 'Z');\n const {result, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:aeef637e-2e7f-49cf-a9cb-eff433d838c5", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential MAY have property \"issuanceDate\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 8926, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 454, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MAY have property \"expirationDate\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n // expires in a year\n const oneYear = Date.now() + 365 * 24 * 60 * 60 * 1000;\n body.credential.expirationDate = new Date(oneYear).toISOString()\n .replace('.000Z', 'Z');\n const {result, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "45iymnRQuPi5LI2HPlHt3", + "ctx": null, + "_testId": "urn:uuid:534e361a-f1c1-44b4-bf37-115759d5d1ab", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Danube Tech", + "rowId": "credential MAY have property \"expirationDate\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 9381, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 458, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "MUST successfully issue a credential.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const {result, data: issuedVc, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.exist(issuedVc, 'Expected result to have data.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n testIssuedVc({issuedVc});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:ac8ba57f-1e9a-4a6d-87a1-37b7e6731428", + "_events": {}, + "_eventsCount": 1, + "link": "https://example.com/", + "cell": { + "columnId": "Digital Bazaar", + "rowId": "MUST successfully issue a credential." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 9840, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 230, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "Request body MUST have property \"credential\".", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.verifiableCredential = {...body.credential};\n delete body.credential;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:aa1b46c2-a0d8-4653-83f5-52c8901cb3ff", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "Request body MUST have property \"credential\"." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 10071, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 103, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"@context\".", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential['@context'];\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:e709c0b7-0f6f-4c0b-a858-ad9bc784c30c", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential MUST have property \"@context\"." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 10175, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 101, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential \"@context\" MUST be an array.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential['@context'] = 4;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:a143cabc-f882-47da-9800-c31b51217a41", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential \"@context\" MUST be an array." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 10277, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 114, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential \"@context\" items MUST be strings.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidContextTypes = [{foo: true}, 4, false, null];\n for(const invalidContextType of invalidContextTypes) {\n body.credential['@context'] = invalidContextType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:167b74d1-015a-4492-9c5f-8b2721c65421", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential \"@context\" items MUST be strings." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 10391, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 402, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"type\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.type;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:ec3d97dd-0c7e-46f4-b97e-c0f4a7792d1c", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential MUST have property \"type\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 10793, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 88, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected status code 400 invalid input!: expected 500 to equal 400", + "showDiff": true, + "actual": "500", + "expected": "400", + "operator": "strictEqual", + "stack": "AssertionError: Expected status code 400 invalid input!: expected 500 to equal 400\n at shouldThrowInvalidInput (tests/assertions.js:16:23)\n at Context. (tests/10-issuer.js:97:9)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "\"credential.type\" MUST be an array.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential.type = 4;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:939eac5d-a2b9-4aac-8d19-3b4bbe28ea9d", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "\"credential.type\" MUST be an array." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 10884, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 94, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected status code 400 invalid input!: expected 500 to equal 400", + "showDiff": true, + "actual": "500", + "expected": "400", + "operator": "strictEqual", + "stack": "AssertionError: Expected status code 400 invalid input!: expected 500 to equal 400\n at shouldThrowInvalidInput (tests/assertions.js:16:23)\n at Context. (tests/10-issuer.js:107:9)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "\"credential.type\" items MUST be strings", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidCredentialTypes = [null, true, 4, []];\n for(const invalidCredentialType of invalidCredentialTypes) {\n body.credential.type = invalidCredentialType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:befee3ab-0503-4bba-b3da-1135def1be7c", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "\"credential.type\" items MUST be strings" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 10981, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 97, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected status code 400 invalid input!: expected 500 to equal 400", + "showDiff": true, + "actual": "500", + "expected": "400", + "operator": "strictEqual", + "stack": "AssertionError: Expected status code 400 invalid input!: expected 500 to equal 400\n at shouldThrowInvalidInput (tests/assertions.js:16:23)\n at Context. (tests/10-issuer.js:119:11)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "credential MUST have property \"issuer\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.issuer;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:a7fcf899-f79a-4f24-a280-89338ac3cf10", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential MUST have property \"issuer\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11081, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 135, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected no result from issuer.: expected Response{ size: +0, data: { …(1) }, …(2) } to not exist", + "showDiff": false, + "actual": { + "size": 0, + "data": { + "verifiableCredential": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/ed25519-2020/v1" + ], + "type": [ + "VerifiableCredential" + ], + "credentialSubject": { + "id": "did:key:z6MkhTNL7i2etLerDK8Acz5t528giE5KA4p75T6ka1E1D74r" + }, + "id": "urn:uuid:a8f0e464-d20d-4a58-aa50-c5155c95b30d", + "issuer": "did:key:z6MkkyNu8RUzvTMCkbw7HyNGPzuExz7VMbeoMtRuu9o4kGdw", + "issuanceDate": "2022-05-23T18:06:49Z", + "proof": { + "type": "Ed25519Signature2020", + "created": "2022-05-23T18:06:49Z", + "verificationMethod": "did:key:z6MkkyNu8RUzvTMCkbw7HyNGPzuExz7VMbeoMtRuu9o4kGdw#z6MkkyNu8RUzvTMCkbw7HyNGPzuExz7VMbeoMtRuu9o4kGdw", + "proofPurpose": "assertionMethod", + "proofValue": "z4gdyohH8bbRneB9xhfwXuPDoBMLBEEJ25PKvJH8x8ZJ427ATczZxnrMx2ZmMwVvSPYb6A2n2rCZd5qk3S9ubuY7J" + } + } + } + }, + "operator": "notStrictEqual", + "stack": "AssertionError: Expected no result from issuer.: expected Response{ size: +0, data: { …(1) }, …(2) } to not exist\n at Object.should.not.exist (node_modules/chai/lib/chai/interface/should.js:208:38)\n at shouldThrowInvalidInput (tests/assertions.js:11:14)\n at Context. (tests/10-issuer.js:130:9)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "\"credential.issuer\" MUST be a string or an object", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidIssuerTypes = [null, true, 4, []];\n for(const invalidIssuerType of invalidIssuerTypes) {\n body.credential.issuer = invalidIssuerType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:1328ae93-e51b-412b-80a7-38813391507c", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "\"credential.issuer\" MUST be a string or an object" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11220, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 132, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected no result from issuer.: expected Response{ size: +0, data: { …(1) }, …(2) } to not exist", + "showDiff": false, + "actual": { + "size": 0, + "data": { + "verifiableCredential": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/ed25519-2020/v1" + ], + "type": [ + "VerifiableCredential" + ], + "credentialSubject": { + "id": "did:key:z6MkhTNL7i2etLerDK8Acz5t528giE5KA4p75T6ka1E1D74r" + }, + "id": "urn:uuid:548424a4-a907-4726-a415-43771593fd21", + "issuer": { + "id": "did:key:z6MkkyNu8RUzvTMCkbw7HyNGPzuExz7VMbeoMtRuu9o4kGdw" + }, + "issuanceDate": "2022-05-23T18:06:49Z", + "proof": { + "type": "Ed25519Signature2020", + "created": "2022-05-23T18:06:49Z", + "verificationMethod": "did:key:z6MkkyNu8RUzvTMCkbw7HyNGPzuExz7VMbeoMtRuu9o4kGdw#z6MkkyNu8RUzvTMCkbw7HyNGPzuExz7VMbeoMtRuu9o4kGdw", + "proofPurpose": "assertionMethod", + "proofValue": "zGpdRb7P8mwoanaJ8vHCx9QvfqC517zgy3yR6AyRpiajegRfz8uvfx5cfVPvCZZrDgUGWeiibpZH1uiG6eSRqPem" + } + } + } + }, + "operator": "notStrictEqual", + "stack": "AssertionError: Expected no result from issuer.: expected Response{ size: +0, data: { …(1) }, …(2) } to not exist\n at Object.should.not.exist (node_modules/chai/lib/chai/interface/should.js:208:38)\n at shouldThrowInvalidInput (tests/assertions.js:11:14)\n at Context. (tests/10-issuer.js:142:11)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "credential MUST have property \"credentialSubject\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.credentialSubject;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:ca890a10-4f5f-4f48-9126-bd16946a4f6b", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential MUST have property \"credentialSubject\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11356, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 101, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected status code 400 invalid input!: expected 500 to equal 400", + "showDiff": true, + "actual": "500", + "expected": "400", + "operator": "strictEqual", + "stack": "AssertionError: Expected status code 400 invalid input!: expected 500 to equal 400\n at shouldThrowInvalidInput (tests/assertions.js:16:23)\n at Context. (tests/10-issuer.js:153:9)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "\"credential.credentialSubject\" MUST be an object", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidCredentialSubjectTypes = [null, true, 4, []];\n for(const invalidCredentialSubjectType of\n invalidCredentialSubjectTypes) {\n body.credential.credentialSubject = invalidCredentialSubjectType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:f479f61b-fa5a-4159-abfa-a8d7c0d28d05", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "\"credential.credentialSubject\" MUST be an object" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11459, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 117, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected status code 400 invalid input!: expected 500 to equal 400", + "showDiff": true, + "actual": "500", + "expected": "400", + "operator": "strictEqual", + "stack": "AssertionError: Expected status code 400 invalid input!: expected 500 to equal 400\n at shouldThrowInvalidInput (tests/assertions.js:16:23)\n at Context. (tests/10-issuer.js:166:11)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "credential MAY have property \"issuanceDate\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential.issuanceDate = new Date().toISOString()\n .replace('.000Z', 'Z');\n const {result, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:18c454b4-db18-48b3-ad4b-d42dd182f7a6", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential MAY have property \"issuanceDate\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11578, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 132, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MAY have property \"expirationDate\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n // expires in a year\n const oneYear = Date.now() + 365 * 24 * 60 * 60 * 1000;\n body.credential.expirationDate = new Date(oneYear).toISOString()\n .replace('.000Z', 'Z');\n const {result, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "Oi-4ObsyocDgyzVflLdzW", + "ctx": null, + "_testId": "urn:uuid:2bab1950-6183-4f9e-bd23-03b3263f48db", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "Digital Bazaar", + "rowId": "credential MAY have property \"expirationDate\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11711, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 128, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "MUST successfully issue a credential.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const {result, data: issuedVc, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.exist(issuedVc, 'Expected result to have data.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n testIssuedVc({issuedVc});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:59b50b61-bece-4e8b-a8ed-5f0c5e1f9a02", + "_events": {}, + "_eventsCount": 1, + "link": "https://example.com/", + "cell": { + "columnId": "SecureKey", + "rowId": "MUST successfully issue a credential." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11843, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 122, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected result from issuer.: expected undefined to exist", + "showDiff": false, + "operator": "strictEqual", + "stack": "AssertionError: Expected result from issuer.: expected undefined to exist\n at Object.should.exist (node_modules/chai/lib/chai/interface/should.js:144:34)\n at Context. (tests/10-issuer.js:39:16)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + }, + { + "type": "test", + "title": "Request body MUST have property \"credential\".", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.verifiableCredential = {...body.credential};\n delete body.credential;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:4852e9d8-74e3-4af2-a97a-aef2c3dab4a6", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "Request body MUST have property \"credential\"." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 11964, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 91, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"@context\".", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential['@context'];\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:be23d6aa-6439-4e1f-aea3-73a2790f7c94", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential MUST have property \"@context\"." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 12056, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 93, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential \"@context\" MUST be an array.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential['@context'] = 4;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:65ef9e4a-2c34-4f4e-80a7-73de11d23bc1", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential \"@context\" MUST be an array." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 12151, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 93, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential \"@context\" items MUST be strings.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidContextTypes = [{foo: true}, 4, false, null];\n for(const invalidContextType of invalidContextTypes) {\n body.credential['@context'] = invalidContextType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:f68f9d53-bc41-4f79-9fd2-0eb7e9e3e892", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential \"@context\" items MUST be strings." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 12245, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 371, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"type\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.type;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:410f12c0-0375-44b2-a289-4eb19eb5331c", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential MUST have property \"type\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 12618, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 92, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.type\" MUST be an array.", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential.type = 4;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:45e16d86-9be4-4957-909c-f0f065ba0a2a", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "\"credential.type\" MUST be an array." + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 12711, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 97, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.type\" items MUST be strings", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidCredentialTypes = [null, true, 4, []];\n for(const invalidCredentialType of invalidCredentialTypes) {\n body.credential.type = invalidCredentialType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:ee3b9f8b-0b5f-4f7d-9695-772b200b922d", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "\"credential.type\" items MUST be strings" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 12810, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 372, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"issuer\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.issuer;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:b6cdc865-df87-4402-94e5-39bb27e438ea", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential MUST have property \"issuer\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 13182, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 100, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.issuer\" MUST be a string or an object", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidIssuerTypes = [null, true, 4, []];\n for(const invalidIssuerType of invalidIssuerTypes) {\n body.credential.issuer = invalidIssuerType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:39a8984d-eed5-4c32-8248-5884c8f020ba", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "\"credential.issuer\" MUST be a string or an object" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 13283, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 378, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MUST have property \"credentialSubject\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n delete body.credential.credentialSubject;\n const {result, error} = await issuer.issue({body});\n shouldThrowInvalidInput({result, error});\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:2b612e97-4e8b-48c2-87bb-8018fd3c43e5", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential MUST have property \"credentialSubject\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 13662, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 96, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "\"credential.credentialSubject\" MUST be an object", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n const invalidCredentialSubjectTypes = [null, true, 4, []];\n for(const invalidCredentialSubjectType of\n invalidCredentialSubjectTypes) {\n body.credential.credentialSubject = invalidCredentialSubjectType;\n const {result, error} = await issuer.issue({body: {...body}});\n shouldThrowInvalidInput({result, error});\n }\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:9761cf8a-581e-48b4-911a-b0bc19d63433", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "\"credential.credentialSubject\" MUST be an object" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 13760, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 377, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MAY have property \"issuanceDate\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n body.credential.issuanceDate = new Date().toISOString()\n .replace('.000Z', 'Z');\n const {result, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:0b1e9303-1dfe-4c96-a50c-624fdb9074f1", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential MAY have property \"issuanceDate\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 14139, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 101, + "state": "passed", + "speed": "slow" + }, + { + "type": "test", + "title": "credential MAY have property \"expirationDate\"", + "body": "async function() {\n this.test.cell = {\n columnId: name,\n rowId: this.test.title\n };\n const body = createRequestBody({issuer});\n // expires in a year\n const oneYear = Date.now() + 365 * 24 * 60 * 60 * 1000;\n body.credential.expirationDate = new Date(oneYear).toISOString()\n .replace('.000Z', 'Z');\n const {result, error} = await issuer.issue({body});\n should.exist(result, 'Expected result from issuer.');\n should.not.exist(error, 'Expected issuer to not Error.');\n result.status.should.equal(201, 'Expected statusCode 201.');\n }", + "async": 0, + "sync": true, + "_timeout": 15000, + "_slow": 75, + "_retries": -1, + "timedOut": false, + "_currentRetry": 0, + "pending": false, + "parent": "91AvPgf3LfUxgt4HBscYI", + "ctx": null, + "_testId": "urn:uuid:bd65ee1f-2ea9-471e-bae5-39f60cbebb13", + "_events": {}, + "_eventsCount": 1, + "cell": { + "columnId": "SecureKey", + "rowId": "credential MAY have property \"expirationDate\"" + }, + "timer": { + "_idleTimeout": -1, + "_idlePrev": null, + "_idleNext": null, + "_idleStart": 14242, + "_onTimeout": null, + "_repeat": null, + "_destroyed": true + }, + "duration": 90, + "state": "failed", + "err": { + "name": "AssertionError", + "message": "Expected result from issuer.: expected undefined to exist", + "showDiff": false, + "operator": "strictEqual", + "stack": "AssertionError: Expected result from issuer.: expected undefined to exist\n at Object.should.exist (node_modules/chai/lib/chai/interface/should.js:144:34)\n at Context. (tests/10-issuer.js:193:16)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)" + } + } + ], + "root": false, + "pending": false, + "_retries": -1, + "_beforeEach": [], + "_beforeAll": [], + "_afterEach": [], + "_afterAll": [], + "_timeout": 15000, + "_slow": 75, + "_bail": false, + "_onlyTests": [], + "_onlySuites": [], + "delayed": false, + "parent": "mid0oIVYC9MDK9BWRzSaQ", + "summary": {}, + "matrix": true, + "report": true, + "implemented": [ + "Danube Tech", + "Digital Bazaar", + "SecureKey" + ], + "notImplemented": [ + "MATTR", + "Mavennet", + "mesur.io", + "Transmute" + ], + "rowLabel": "Test Name", + "columnLabel": "Issuer", + "reportData": [], + "_testId": "urn:uuid:85736138-d9c1-42f5-8b7a-f2225866d21f" + }, + { + "title": "Issue Credential - JWT", + "ctx": null, + "suites": [], + "tests": [], + "root": false, + "pending": false, + "_retries": -1, + "_beforeEach": [], + "_beforeAll": [], + "_afterEach": [], + "_afterAll": [], + "_timeout": 15000, + "_slow": 75, + "_bail": false, + "_onlyTests": [], + "_onlySuites": [], + "delayed": false, + "parent": "mid0oIVYC9MDK9BWRzSaQ", + "summary": {}, + "matrix": true, + "report": true, + "implemented": [], + "notImplemented": [ + "Danube Tech", + "Digital Bazaar", + "MATTR", + "Mavennet", + "mesur.io", + "SecureKey", + "Transmute" + ], + "rowLabel": "Test Name", + "columnLabel": "Issuer", + "reportData": [] + } + ], + "tests": [], + "root": true, + "pending": false, + "_retries": -1, + "_beforeEach": [], + "_beforeAll": [], + "_afterEach": [], + "_afterAll": [], + "_timeout": 15000, + "_slow": 75, + "_bail": false, + "_onlyTests": [], + "_onlySuites": [], + "delayed": false, + "_events": { + "pre-require": [ + null, + null + ] + }, + "_eventsCount": 1, + "_testId": "urn:uuid:03dedd19-3da5-4c09-b3d0-04ec9de4cea1" +} diff --git a/test/mocha/10-render.js b/test/mocha/10-render.js index 29cbbd2..798959a 100644 --- a/test/mocha/10-render.js +++ b/test/mocha/10-render.js @@ -2,7 +2,7 @@ * Copyright (c) 2021-2022 Digital Bazaar, Inc. All rights reserved. */ import {join} from 'path'; -import {singleMatrix, multipleMatrices} from '../mock-data.js'; +import {highlightMatrix, singleMatrix, multipleMatrices} from '../mock-data.js'; import {makeReport} from '../../lib/generate.js'; import {getConfig} from '../../lib/config.js'; import {shouldBeReport} from '../assertions.js'; @@ -45,4 +45,15 @@ describe('generate', async function() { join(rootPath, 'test/multiple-report.html')); shouldBeReport(report, expectedReport.toString()); }); + it('should highlight rows with less than 2 passes', async function() { + const report = await makeReport({ + suite: highlightMatrix, + stats, + config: {...config} + }); + await asyncWriteFile(join(rootPath, 'test/highlight-report.html'), report); + const expectedReport = await asyncReadFile( + join(rootPath, 'test/highlight-report.html')); + shouldBeReport(report, expectedReport.toString()); + }); }); diff --git a/test/mock-data.js b/test/mock-data.js index d74f9d9..aa8d339 100644 --- a/test/mock-data.js +++ b/test/mock-data.js @@ -3,3 +3,4 @@ const requireJson = createRequire(import.meta.url); export const singleMatrix = requireJson('./single-matrix.json'); export const multipleMatrices = requireJson('./multiple-matrix.json'); +export const highlightMatrix = requireJson('./highlight-matrix.json'); From 62a3e5a0a370d1537ef9ae445d710290ebab0715 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Thu, 12 Sep 2024 13:53:17 -0400 Subject: [PATCH 02/20] Add new helper weak and css class for weak implementations. --- lib/handlebars.js | 2 ++ templates/head.hbs | 3 +++ templates/matrix.hbs | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/handlebars.js b/lib/handlebars.js index e737305..76b12eb 100644 --- a/lib/handlebars.js +++ b/lib/handlebars.js @@ -25,6 +25,8 @@ const registerHelpers = ({config}) => { Handlebars.registerHelper( 'getOptional', optional => optional ? 'optional' : 'not-optional'); + const weak = cells => cells.filter(c => c.state === 'passed').length >= 2; + Handlebars.registerHelper('weak', c => weak(c) ? 'normative' : 'weak'); try { if(!helpersFile) { return; diff --git a/templates/head.hbs b/templates/head.hbs index 2b3c892..7e32be0 100644 --- a/templates/head.hbs +++ b/templates/head.hbs @@ -32,5 +32,8 @@ align-items: center; justify-content: center; width: fit-content; +} +.weak { + opacity: 0.6; } diff --git a/templates/matrix.hbs b/templates/matrix.hbs index a504228..f6a2602 100644 --- a/templates/matrix.hbs +++ b/templates/matrix.hbs @@ -17,7 +17,7 @@ {{#each matrix.rows}} - + {{#if link}} From 29bc69ac78dfc9369d2b4c450af0a208acfe800b Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Thu, 12 Sep 2024 14:08:39 -0400 Subject: [PATCH 03/20] Prefer at-risk & safe over weak & normative. --- lib/handlebars.js | 5 +++-- templates/head.hbs | 2 +- templates/matrix.hbs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/handlebars.js b/lib/handlebars.js index 76b12eb..0eabe29 100644 --- a/lib/handlebars.js +++ b/lib/handlebars.js @@ -25,8 +25,9 @@ const registerHelpers = ({config}) => { Handlebars.registerHelper( 'getOptional', optional => optional ? 'optional' : 'not-optional'); - const weak = cells => cells.filter(c => c.state === 'passed').length >= 2; - Handlebars.registerHelper('weak', c => weak(c) ? 'normative' : 'weak'); + const atRisk = cells => !(cells.filter( + c => c.state === 'passed').length >= 2); + Handlebars.registerHelper('atRisk', c => atRisk(c) ? 'at-risk' : 'safe'); try { if(!helpersFile) { return; diff --git a/templates/head.hbs b/templates/head.hbs index 7e32be0..837c631 100644 --- a/templates/head.hbs +++ b/templates/head.hbs @@ -33,7 +33,7 @@ justify-content: center; width: fit-content; } -.weak { +.at-risk { opacity: 0.6; } diff --git a/templates/matrix.hbs b/templates/matrix.hbs index f6a2602..74c18b1 100644 --- a/templates/matrix.hbs +++ b/templates/matrix.hbs @@ -17,7 +17,7 @@ {{#each matrix.rows}} - + {{#if link}} From d77933f4895ead61620487689050be1e19e79fa0 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Thu, 12 Sep 2024 14:14:26 -0400 Subject: [PATCH 04/20] Use confirmed over safe. --- lib/handlebars.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/handlebars.js b/lib/handlebars.js index 0eabe29..68c9650 100644 --- a/lib/handlebars.js +++ b/lib/handlebars.js @@ -27,7 +27,7 @@ const registerHelpers = ({config}) => { 'getOptional', optional => optional ? 'optional' : 'not-optional'); const atRisk = cells => !(cells.filter( c => c.state === 'passed').length >= 2); - Handlebars.registerHelper('atRisk', c => atRisk(c) ? 'at-risk' : 'safe'); + Handlebars.registerHelper('atRisk', c => atRisk(c) ? 'at-risk' : 'confirmed'); try { if(!helpersFile) { return; From c8c574d15014d8233709b80c6d843f7ad97ab215 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Fri, 13 Sep 2024 17:08:05 +0000 Subject: [PATCH 05/20] Comment handlebars helpers. --- lib/handlebars.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/handlebars.js b/lib/handlebars.js index 68c9650..4f081ae 100644 --- a/lib/handlebars.js +++ b/lib/handlebars.js @@ -25,8 +25,10 @@ const registerHelpers = ({config}) => { Handlebars.registerHelper( 'getOptional', optional => optional ? 'optional' : 'not-optional'); + // at risk statements have less than 2 conforming implementations const atRisk = cells => !(cells.filter( c => c.state === 'passed').length >= 2); + // add a css class to rows that are at risk Handlebars.registerHelper('atRisk', c => atRisk(c) ? 'at-risk' : 'confirmed'); try { if(!helpersFile) { From a787d6764a88cf9d49f71a881b5fd22975ba276b Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Fri, 13 Sep 2024 17:35:35 +0000 Subject: [PATCH 06/20] Add FIXME for optional in test title. --- lib/handlers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/handlers.js b/lib/handlers.js index c386bea..9d5bf9a 100644 --- a/lib/handlers.js +++ b/lib/handlers.js @@ -172,6 +172,7 @@ export function formatTest(test, parentSuite = '') { .trim(); return { // optional means the test is non-normative + // FIXME remove this optional check in a major release optional: false, ...test, fullTitle, From 8d6ce57e5a65479dd6a1b51b008fef1fe29c863e Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Fri, 13 Sep 2024 17:35:55 +0000 Subject: [PATCH 07/20] Add initial extensions for templateData. --- lib/extensions.js | 17 +++++++++++++++++ lib/generate.js | 9 +++++++++ 2 files changed, 26 insertions(+) create mode 100644 lib/extensions.js diff --git a/lib/extensions.js b/lib/extensions.js new file mode 100644 index 0000000..a3e31a9 --- /dev/null +++ b/lib/extensions.js @@ -0,0 +1,17 @@ +/*! + * Copyright (c) 2024 Digital Bazaar, Inc. All rights reserved. + */ + +/** + * Extensions are functions that extend test data reports. + * Extensions maybe toggled off or on. + */ +export const extensions = { + templateData: { + addAtRisk({templateData}) { + if(templateData.matrices.length) { + + } + } + } +}; diff --git a/lib/generate.js b/lib/generate.js index 10e840d..adc6d43 100644 --- a/lib/generate.js +++ b/lib/generate.js @@ -1,6 +1,7 @@ /**! * Copyright (c) 2019-2022 Digital Bazaar, Inc. All rights reserved. */ +import {extensions} from './extensions.js'; import {makeTemplate} from './handlebars.js'; import {getJson, getPartial, writeJSON} from './files.js'; import {findReports, makeTemplateData} from './handlers.js'; @@ -20,6 +21,14 @@ export async function makeReport({suite, stats, config}) { const reports = findReports({suite}); const {summary = new Set()} = suite.suites.find(s => s.summary) || {}; const templateData = makeTemplateData({reports}); + // seee if any template extensions have been registered + const templateExtensions = extensions.templateData; + if(templateExtensions) { + // run each registered extension on the templateData + for(const prop in templateExtensions) { + await templateExtensions[prop]({templateData}); + } + } templateData.respecConfig = config.respecConfig = await getJson(respecConfig); templateData.title = title; templateData.stats = stats; From e3be2a64a4ea0efbed83206d17dee78eec881cca Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Fri, 13 Sep 2024 21:00:09 +0000 Subject: [PATCH 08/20] Add at risk to matrices. --- lib/extensions.js | 14 +++++++++++++- lib/handlebars.js | 5 +---- lib/utils.js | 5 +++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/lib/extensions.js b/lib/extensions.js index a3e31a9..43f8a29 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -1,6 +1,7 @@ /*! * Copyright (c) 2024 Digital Bazaar, Inc. All rights reserved. */ +import {atRisk} from './utils.js'; /** * Extensions are functions that extend test data reports. @@ -10,8 +11,19 @@ export const extensions = { templateData: { addAtRisk({templateData}) { if(templateData.matrices.length) { - + templateData.matrices = templateData.matrices.flatMap(addAtRisk); } } } }; + +function addAtRisk(matrix) { + const {rows = [], columns, suite} = matrix; + const atRiskMatrix = { + ...suite, + title: 'At Risk', + columns: [...columns], + rows: rows.filter(({cells}) => atRisk(cells)) + }; + return [matrix, atRiskMatrix]; +} diff --git a/lib/handlebars.js b/lib/handlebars.js index 4f081ae..7e0e5d0 100644 --- a/lib/handlebars.js +++ b/lib/handlebars.js @@ -4,7 +4,7 @@ import Handlebars from 'handlebars'; import {statusMarks} from './statusMarks.js'; import {formatJSON} from './files.js'; -import {UTCDateTime} from './utils.js'; +import {UTCDateTime, atRisk} from './utils.js'; // helpersFile is a path to a project specific helpers file. const registerHelpers = ({config}) => { @@ -25,9 +25,6 @@ const registerHelpers = ({config}) => { Handlebars.registerHelper( 'getOptional', optional => optional ? 'optional' : 'not-optional'); - // at risk statements have less than 2 conforming implementations - const atRisk = cells => !(cells.filter( - c => c.state === 'passed').length >= 2); // add a css class to rows that are at risk Handlebars.registerHelper('atRisk', c => atRisk(c) ? 'at-risk' : 'confirmed'); try { diff --git a/lib/utils.js b/lib/utils.js index 8ece025..eba9db4 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -40,3 +40,8 @@ export const UTCDateTime = (lang = 'en-AU') => { minute: 'numeric' }); }; + +// at risk statements have less than 2 conforming implementations +export const atRisk = cells => !(cells.filter( + c => c.state === 'passed').length >= 2); + From b915e55e354429ccea8adcf4de306e8ff811c29a Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Fri, 13 Sep 2024 21:05:49 +0000 Subject: [PATCH 09/20] Only add at risk if atRiskRows. --- lib/extensions.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/extensions.js b/lib/extensions.js index 43f8a29..2fa3fbd 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -18,12 +18,15 @@ export const extensions = { }; function addAtRisk(matrix) { - const {rows = [], columns, suite} = matrix; - const atRiskMatrix = { - ...suite, - title: 'At Risk', - columns: [...columns], - rows: rows.filter(({cells}) => atRisk(cells)) - }; - return [matrix, atRiskMatrix]; + const {rows = [], columns} = matrix; + const atRiskRows = rows.filter(({cells}) => atRisk(cells)); + if(atRiskRows.length) { + return [matrix, { + ...matrix, + title: matrix?.title + ' At Risk', + columns: [...columns], + rows: atRiskRows + }]; + } + return [matrix]; } From ab476232be3b26fbd7b3a49d3794e8fda5be45c8 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Fri, 13 Sep 2024 21:17:28 +0000 Subject: [PATCH 10/20] Remove opacity filter from at risk rows. --- templates/matrix.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/matrix.hbs b/templates/matrix.hbs index 74c18b1..a504228 100644 --- a/templates/matrix.hbs +++ b/templates/matrix.hbs @@ -17,7 +17,7 @@ {{#each matrix.rows}} - + {{#if link}} From e402de316b708a7cae2149b983d1c5303c598930 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Mon, 16 Sep 2024 15:50:15 +0000 Subject: [PATCH 11/20] Add a single atRisk matrix at the end of the report. --- lib/extensions.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/extensions.js b/lib/extensions.js index 2fa3fbd..267fa9d 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -11,22 +11,22 @@ export const extensions = { templateData: { addAtRisk({templateData}) { if(templateData.matrices.length) { - templateData.matrices = templateData.matrices.flatMap(addAtRisk); + const atRiskRows = templateData.matrices.flatMap(addAtRisk); + if(atRiskRows.length) { + const atRiskMatrix = { + title: 'At Risk', + columns: templateData.matrices[0].columns, + rows: atRiskRows + }; + templateData.matrices.push(atRiskMatrix); + } } } } }; function addAtRisk(matrix) { - const {rows = [], columns} = matrix; + const {rows = []} = matrix; const atRiskRows = rows.filter(({cells}) => atRisk(cells)); - if(atRiskRows.length) { - return [matrix, { - ...matrix, - title: matrix?.title + ' At Risk', - columns: [...columns], - rows: atRiskRows - }]; - } - return [matrix]; + return atRiskRows; } From 3f8766c5d2267d464683e31fb31f74d6b0f291c5 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Mon, 16 Sep 2024 16:14:27 +0000 Subject: [PATCH 12/20] Shorten addAtRisk. --- lib/extensions.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/extensions.js b/lib/extensions.js index 267fa9d..ecbcc2f 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -25,8 +25,6 @@ export const extensions = { } }; -function addAtRisk(matrix) { - const {rows = []} = matrix; - const atRiskRows = rows.filter(({cells}) => atRisk(cells)); - return atRiskRows; +function addAtRisk({rows = []} = {}) { + return rows.filter(({cells}) => atRisk(cells)); } From 130d0d5fcf3cdcb0c667b6b7f25b2d1425108cbc Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Mon, 16 Sep 2024 15:29:46 -0400 Subject: [PATCH 13/20] Use a thin warning border on at risk rows. --- templates/head.hbs | 3 ++- templates/matrix.hbs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/head.hbs b/templates/head.hbs index 837c631..b277c18 100644 --- a/templates/head.hbs +++ b/templates/head.hbs @@ -34,6 +34,7 @@ width: fit-content; } .at-risk { - opacity: 0.6; + outline: thin #c45e0a solid; } + diff --git a/templates/matrix.hbs b/templates/matrix.hbs index a504228..eeedda9 100644 --- a/templates/matrix.hbs +++ b/templates/matrix.hbs @@ -17,7 +17,7 @@ {{#each matrix.rows}} - + {{#if link}} From 8a6f115f2fbcfc816d07e7432eb288b44b7e8c83 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 17 Sep 2024 12:35:59 -0400 Subject: [PATCH 14/20] Make At Row section more explicit. --- lib/extensions.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/extensions.js b/lib/extensions.js index ecbcc2f..9a7b379 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -15,7 +15,7 @@ export const extensions = { if(atRiskRows.length) { const atRiskMatrix = { title: 'At Risk', - columns: templateData.matrices[0].columns, + columns: ['More than 2 passing implementations'], rows: atRiskRows }; templateData.matrices.push(atRiskMatrix); @@ -26,5 +26,9 @@ export const extensions = { }; function addAtRisk({rows = []} = {}) { - return rows.filter(({cells}) => atRisk(cells)); + return rows.filter(({cells}) => atRisk(cells)).map( + row => { + row.cells = [{state: 'failed'}]; + return row; + }); } From 0f6fdd65118ede16196d63b95ab0e3dee32c80ce Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 17 Sep 2024 12:38:26 -0400 Subject: [PATCH 15/20] Add row and column labels. --- lib/extensions.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/extensions.js b/lib/extensions.js index 9a7b379..e37d8bf 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -15,6 +15,8 @@ export const extensions = { if(atRiskRows.length) { const atRiskMatrix = { title: 'At Risk', + rowLabel: 'Statement', + columnLabel: 'Reason', columns: ['More than 2 passing implementations'], rows: atRiskRows }; From c8e96998ae1d3fd966b3ad0235ee200b368060a5 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 18 Sep 2024 13:59:55 +0000 Subject: [PATCH 16/20] Use getAtRisk which filters duplicate statements. --- lib/extensions.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/lib/extensions.js b/lib/extensions.js index e37d8bf..83c9d1b 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -11,7 +11,7 @@ export const extensions = { templateData: { addAtRisk({templateData}) { if(templateData.matrices.length) { - const atRiskRows = templateData.matrices.flatMap(addAtRisk); + const atRiskRows = getAtRisk({matrices: templateData.matrices}); if(atRiskRows.length) { const atRiskMatrix = { title: 'At Risk', @@ -27,10 +27,20 @@ export const extensions = { } }; -function addAtRisk({rows = []} = {}) { - return rows.filter(({cells}) => atRisk(cells)).map( - row => { - row.cells = [{state: 'failed'}]; - return row; - }); +function getAtRisk({matrices}) { + const riskRows = []; + for(const {rows} of matrices) { + for(const row of rows) { + // only include at risk rows + if(atRisk(row?.cells)) { + // do not include duplicate statements + if(!riskRows.find(r => r.id === row.id)) { + const riskRow = structuredClone(row); + riskRow.cells = [{state: 'failed'}]; + riskRows.push(riskRow); + } + } + } + } + return riskRows; } From 343e84a2d63653e8e4fc3f984158e4b5d5c95a24 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 18 Sep 2024 14:29:33 +0000 Subject: [PATCH 17/20] Shallow copy row. --- lib/extensions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extensions.js b/lib/extensions.js index 83c9d1b..b8ac2a2 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -35,7 +35,7 @@ function getAtRisk({matrices}) { if(atRisk(row?.cells)) { // do not include duplicate statements if(!riskRows.find(r => r.id === row.id)) { - const riskRow = structuredClone(row); + const riskRow = {...row}; riskRow.cells = [{state: 'failed'}]; riskRows.push(riskRow); } From 95d80781e66eaa8ce210f9f7992338786c1bae5b Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 18 Sep 2024 17:06:40 -0400 Subject: [PATCH 18/20] Do not add statements that were skipped. --- lib/extensions.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/extensions.js b/lib/extensions.js index b8ac2a2..6bef041 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -31,6 +31,10 @@ function getAtRisk({matrices}) { const riskRows = []; for(const {rows} of matrices) { for(const row of rows) { + // if all tests were skipped then don't add it to at risk + if(row?.cells.every(cell => cell.state === 'pending')) { + continue; + } // only include at risk rows if(atRisk(row?.cells)) { // do not include duplicate statements From 45735c3e07f2f035c476e2ece0076e7563274fb2 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 18 Sep 2024 17:11:12 -0400 Subject: [PATCH 19/20] Do not include interop in at risk. --- lib/extensions.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/extensions.js b/lib/extensions.js index 6bef041..2041624 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -29,7 +29,11 @@ export const extensions = { function getAtRisk({matrices}) { const riskRows = []; - for(const {rows} of matrices) { + for(const {rows, title} of matrices) { + // do not include interop results in at risk + if(title.includes('(interop)')) { + continue; + } for(const row of rows) { // if all tests were skipped then don't add it to at risk if(row?.cells.every(cell => cell.state === 'pending')) { @@ -38,7 +42,7 @@ function getAtRisk({matrices}) { // only include at risk rows if(atRisk(row?.cells)) { // do not include duplicate statements - if(!riskRows.find(r => r.id === row.id)) { + if(!riskRows.some(r => r.id === row.id)) { const riskRow = {...row}; riskRow.cells = [{state: 'failed'}]; riskRows.push(riskRow); From 4136b46492c41128a657d5dc84d23c43bf96dc37 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 18 Sep 2024 17:26:25 -0400 Subject: [PATCH 20/20] Change column text to At least 2 passing implementations. --- lib/extensions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extensions.js b/lib/extensions.js index 2041624..5877c33 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -17,7 +17,7 @@ export const extensions = { title: 'At Risk', rowLabel: 'Statement', columnLabel: 'Reason', - columns: ['More than 2 passing implementations'], + columns: ['At least 2 passing implementations'], rows: atRiskRows }; templateData.matrices.push(atRiskMatrix);