From 88347f8edab2de0a85c48cfd706569c0e65d734e Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Thu, 21 Dec 2023 15:49:50 +0000 Subject: [PATCH] Make interop tests more accurate. --- CHANGELOG.md | 3 +++ tests/30-interop.js | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cdcf225..2d112eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ ### Added - Add a default key seed for test data generation. +### Fixed +- Interop test reports results more accurately. + ## 1.0.0 - 2023-11-09 ### Added diff --git a/tests/30-interop.js b/tests/30-interop.js index 4c5c87c..399aaeb 100644 --- a/tests/30-interop.js +++ b/tests/30-interop.js @@ -33,6 +33,7 @@ describe('Ed25519Signature2020 (interop)', function() { this.columnLabel = 'Verifier'; for(const [issuerName, {issuers}] of issuerMatches) { let issuedVc; + let issuerError; before(async function() { const issuer = issuers.find(issuer => issuer.tags.has('Ed25519Signature2020')); @@ -41,9 +42,7 @@ describe('Ed25519Signature2020 (interop)', function() { body.credential.id = `urn:uuid:${uuidv4()}`; body.credential.issuer = issuerId; const {data, error} = await issuer.post({json: body}); - if(error) { - throw error; - } + issuerError = error; issuedVc = data; }); for(const [verifierName, {verifiers}] of verifierMatches) { @@ -51,6 +50,11 @@ describe('Ed25519Signature2020 (interop)', function() { verifier.tags.has(tag)); it(`${verifierName} should verify ${issuerName}`, async function() { this.test.cell = {rowId: issuerName, columnId: verifierName}; + should.not.exist( + issuerError, + `Expected issuer: ${issuerName} to not error` + ); + should.exist(issuedVc, `Expected issuer: ${issuerName} to issue a VC`); const body = { verifiableCredential: issuedVc, options: {