Skip to content

Commit cceb97c

Browse files
committed
Move matrix construction code into suites/algorithms.
1 parent 569477d commit cceb97c

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

suites/algorithms.js

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,37 @@ import {createInitialVc} from '../helpers.js';
77
const expect = chai.expect;
88

99
export function algorithmsSuite({
10-
endpoints,
10+
implemented,
1111
testDescription = 'Data Integrity - Algorithms',
12-
vendorName,
1312
credential,
1413
features = {
1514
authentication: false,
1615
proofChain: false
1716
}
1817
}) {
1918
return describe(testDescription, function() {
20-
const columnId = testDescription;
19+
// this will tell the report
20+
// to make an interop matrix with this suite
21+
this.matrix = true;
22+
this.report = true;
23+
this.rowLabel = 'Test Name';
24+
this.columnLabel = 'Verifier';
25+
this.implemented = [];
26+
for(const [vendorName, {endpoints}] of implemented) {
27+
if(!endpoints) {
28+
throw new Error(`Expected ${vendorName} to have endpoints.`);
29+
}
30+
algorithmsAssert({vendorName, credential, endpoints, features});
31+
}
32+
});
33+
}
34+
35+
function algorithmsAssert({vendorName, credential, endpoints, features}) {
36+
return describe(vendorName, function() {
2137
const [issuer] = endpoints;
2238
beforeEach(function() {
2339
this.currentTest.cell = {
24-
columnId,
40+
columnId: vendorName,
2541
rowId: this.currentTest.title
2642
};
2743
});

tests/30-algorithms.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function _runSuite({
5353
});
5454
implemented.set(suiteName, {endpoints: [issuer]});
5555
algorithmsSuite({
56-
endpoints: [issuer],
56+
implemented,
5757
tag,
5858
credential,
5959
cryptosuiteName: suiteName,

0 commit comments

Comments
 (0)