Skip to content

Commit

Permalink
Make interop tests more accurate.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Dec 21, 2023
1 parent 8325db4 commit 88347f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions tests/30-interop.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand All @@ -41,16 +42,19 @@ 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) {
const verifier = verifiers.find(verifier =>
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: {
Expand Down

0 comments on commit 88347f8

Please sign in to comment.