File tree Expand file tree Collapse file tree 2 files changed +48
-2
lines changed Expand file tree Collapse file tree 2 files changed +48
-2
lines changed Original file line number Diff line number Diff line change 1+ /*!
2+ * Copyright 2024 Digital Bazaar, Inc.
3+ * SPDX-License-Identifier: BSD-3-Clause
4+ */
5+ import { conformanceSuite } from './suites/conformance.js' ;
6+ import { endpoints } from 'vc-test-suite-implementations' ;
7+ import { getSuiteConfig } from './test-config.js' ;
8+
9+ const cryptosuites = [
10+ 'ecdsa-rdfc-2019' ,
11+ 'ecdsa-sd-2023'
12+ ] ;
13+
14+ for ( const suiteName of cryptosuites ) {
15+ const { tags, credentials, vectors} = getSuiteConfig ( suiteName ) ;
16+ const { match : verifiers } = endpoints . filterByTag ( {
17+ tags : [ ...tags ] ,
18+ property : 'verifiers'
19+ } ) ;
20+ for ( const vcVersion of vectors . vcTypes ) {
21+ const {
22+ document,
23+ mandatoryPointers,
24+ selectivePointers
25+ } = credentials . create [ vcVersion ] ;
26+ for ( const keyType of vectors . keyTypes ) {
27+ conformanceSuite ( {
28+ verifiers,
29+ suiteName,
30+ keyType,
31+ vcVersion,
32+ credential : document ,
33+ mandatoryPointers,
34+ selectivePointers
35+ } ) ;
36+ }
37+ }
38+ }
Original file line number Diff line number Diff line change @@ -11,12 +11,14 @@ import {DataIntegrityProof} from '@digitalbazaar/data-integrity';
1111import { getMultiKey } from '../vc-generator/key-gen.js' ;
1212import { getSuite } from '../vc-generator/cryptosuites.js' ;
1313
14- export function assertConformance ( {
14+ export function conformanceSuite ( {
1515 verifiers,
1616 suiteName,
1717 keyType,
1818 vcVersion,
1919 credential,
20+ mandatoryPointers,
21+ selectivePointers,
2022 setup = _setup
2123} ) {
2224 describe ( `${ suiteName } - Conformance - VC ${ vcVersion } ` , function ( ) {
@@ -27,7 +29,13 @@ export function assertConformance({
2729 this . columnLabel = 'Implementation' ;
2830 let credentials = new Map ( ) ;
2931 before ( async function ( ) {
30- credentials = await setup ( { credential, suiteName, keyType} ) ;
32+ credentials = await setup ( {
33+ credential,
34+ mandatoryPointers,
35+ selectivePointers,
36+ suiteName,
37+ keyType
38+ } ) ;
3139 } ) ;
3240 for ( const [ name , { endpoints} ] of verifiers ) {
3341 const [ verifier ] = endpoints ;
You can’t perform that action at this time.
0 commit comments