diff --git a/package.json b/package.json index 06cba1c..86bcecd 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "canonicalize": "^1.0.8", "chai": "^4.3.6", "credentials-context": "^2.0.0", - "data-integrity-test-suite-assertion": "github:w3c-ccg/data-integrity-test-suite-assertion", + "data-integrity-test-suite-assertion": "github:w3c-ccg/data-integrity-test-suite-assertion#make-vc-gen-suite-configurable", "ed25519-signature-2018-context": "^1.1.0", "ed25519-signature-2020-context": "^1.1.0", "jsonld": "^8.1.0", diff --git a/tests/05-di-ed25519-create.js b/tests/05-di-ed25519-create.js new file mode 100644 index 0000000..e1189af --- /dev/null +++ b/tests/05-di-ed25519-create.js @@ -0,0 +1,19 @@ +/*! + * Copyright (c) 2022-2024 Digital Bazaar, Inc. + * SPDX-License-Identifier: BSD-3-Clause + */ +import { + checkDataIntegrityProofFormat +} from 'data-integrity-test-suite-assertion'; +import {endpoints} from 'vc-test-suite-implementations'; +import {tag} from './test-config.js'; + +// only use implementations with `Ed25519 2020` issuers. +const {match} = endpoints.filterByTag({tags: [tag], property: 'issuers'}); + +checkDataIntegrityProofFormat({ + implemented: match, tag, + expectedProofTypes: ['Ed25519Signature2020'], + expectedCryptoSuite: false +}); + diff --git a/tests/10-ed25519-create.js b/tests/10-ed25519-create.js index fc22ced..653b647 100644 --- a/tests/10-ed25519-create.js +++ b/tests/10-ed25519-create.js @@ -4,9 +4,6 @@ */ import {bs58Decode, getPublicKeyBytes} from './helpers.js'; import chai from 'chai'; -import { - checkDataIntegrityProofFormat -} from 'data-integrity-test-suite-assertion'; import {endpoints} from 'vc-test-suite-implementations'; import {generateTestData} from './vc-generator/index.js'; import {klona} from 'klona'; @@ -23,11 +20,6 @@ describe('Ed25519Signature2020 (create)', function() { const credentials = await generateTestData(); validVc = credentials.get('validVc'); }); - checkDataIntegrityProofFormat({ - implemented: match, tag, - expectedProofTypes: ['Ed25519Signature2020'], - expectedCryptoSuite: false - }); describe('Ed25519Signature2020 (issuer)', function() { // this will tell the report diff --git a/tests/15-di-ed25519-verify.js b/tests/15-di-ed25519-verify.js new file mode 100644 index 0000000..bd6ae8a --- /dev/null +++ b/tests/15-di-ed25519-verify.js @@ -0,0 +1,16 @@ +import { + checkDataIntegrityProofVerifyErrors +} from 'data-integrity-test-suite-assertion'; +import {endpoints} from 'vc-test-suite-implementations'; +import {tag} from './test-config.js'; + +// only use implementations with `Ed25519 2020` verifiers. +const {match} = endpoints.filterByTag({ + tags: [tag], + property: 'verifiers' +}); + +checkDataIntegrityProofVerifyErrors({ + implemented: match, + expectedProofType: 'Ed25519Signature2020' +}); diff --git a/tests/20-ed25519-verify.js b/tests/20-ed25519-verify.js index 0f5f5ca..9e80e94 100644 --- a/tests/20-ed25519-verify.js +++ b/tests/20-ed25519-verify.js @@ -4,9 +4,6 @@ */ import {bs58Decode, bs58Encode} from './helpers.js'; import {verificationFail, verificationSuccess} from './assertions.js'; -import { - checkDataIntegrityProofVerifyErrors -} from 'data-integrity-test-suite-assertion'; import {endpoints} from 'vc-test-suite-implementations'; import {generateTestData} from './vc-generator/index.js'; import {klona} from 'klona'; @@ -28,10 +25,6 @@ describe('Ed25519Signature2020 (verify)', function() { incorrectCannonization = credentials.get('canonizeJcs'); incorrectHash = credentials.get('digestSha512'); }); - checkDataIntegrityProofVerifyErrors({ - implemented: match, - expectedProofType: 'Ed25519Signature2020' - }); describe('Ed25519Signature2020 (verifier)', function() { // this will tell the report