Skip to content

Commit

Permalink
Add matrix code to common & push name to implemented.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Nov 13, 2024
1 parent 45ef25e commit 89fc2a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/suites/algorithms.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ export function commonAlgorithms({
}) {
const title = `${suiteName} - Algorithms Common - VC ${vcVersion}`;
return describe(title, function() {
this.matrix = true;
this.report = true;
this.implemented = [];
this.rowLabel = 'Test Name';
this.columnLabel = 'Implementation';
const credentials = new Map(keyTypes.map(keyType => [keyType, null]));
before(async function() {
for(const keyType of keyTypes) {
Expand All @@ -39,6 +44,7 @@ export function commonAlgorithms({
});
for(const [name, {endpoints}] of verifiers) {
const [verifier] = endpoints;
this.implemented.push(`${name}`);
describe(`${name}`, function() {
beforeEach(function() {
this.currentTest.cell = {
Expand Down Expand Up @@ -345,6 +351,7 @@ function invalidHashProxy({
cryptosuite, document, proof,
documentLoader, dataIntegrityProof
} = {}) {
// this switch the hash to the wrong hash for that keyType
const algorithm = (keyType === 'P-256') ? 'sha384' : 'sha256';
const c14nOptions = {
documentLoader,
Expand Down

0 comments on commit 89fc2a3

Please sign in to comment.