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';
11
11
import { getMultiKey } from '../vc-generator/key-gen.js' ;
12
12
import { getSuite } from '../vc-generator/cryptosuites.js' ;
13
13
14
- export function assertConformance ( {
14
+ export function conformanceSuite ( {
15
15
verifiers,
16
16
suiteName,
17
17
keyType,
18
18
vcVersion,
19
19
credential,
20
+ mandatoryPointers,
21
+ selectivePointers,
20
22
setup = _setup
21
23
} ) {
22
24
describe ( `${ suiteName } - Conformance - VC ${ vcVersion } ` , function ( ) {
@@ -27,7 +29,13 @@ export function assertConformance({
27
29
this . columnLabel = 'Implementation' ;
28
30
let credentials = new Map ( ) ;
29
31
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
+ } ) ;
31
39
} ) ;
32
40
for ( const [ name , { endpoints} ] of verifiers ) {
33
41
const [ verifier ] = endpoints ;
You can’t perform that action at this time.
0 commit comments