Skip to content

Commit

Permalink
Add basic algorithms test.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Nov 10, 2024
1 parent 5fb76cc commit f825436
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
37 changes: 37 additions & 0 deletions tests/90-algorithms.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*!
* Copyright 2024 Digital Bazaar, Inc.
* SPDX-License-Identifier: BSD-3-Clause
*/
import {ecdsaRdfc2019Algorithms} from './suites/algorithms.js';
import {endpoints} from 'vc-test-suite-implementations';
import {getSuiteConfig} from './test-config.js';

const cryptosuites = [
'ecdsa-rdfc-2019',
];

for(const suiteName of cryptosuites) {
const {tags, credentials, vectors} = getSuiteConfig(suiteName);
const {match: verifiers} = endpoints.filterByTag({
tags: [...tags],
property: 'verifiers'
});
for(const vcVersion of vectors.vcTypes) {
const {
document,
mandatoryPointers,
selectivePointers
} = credentials.create[vcVersion];
for(const keyType of vectors.keyTypes) {
ecdsaRdfc2019Algorithms({
verifiers,
suiteName,
keyType,
vcVersion,
credential: document,
mandatoryPointers,
selectivePointers
});
}
}
}
4 changes: 2 additions & 2 deletions tests/suites/algorithms.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,14 @@ async function _setup({
await issueCloned(_generateNoTypeCryptosuite({
signer,
suiteName,
credential,
credential: _credential,
mandatoryPointers,
selectivePointers
})));
return credentials;
}

async function _generateNoTypeCryptosuite({
function _generateNoTypeCryptosuite({
signer,
suiteName,
credential,
Expand Down

0 comments on commit f825436

Please sign in to comment.