Skip to content

Commit

Permalink
Add helpers w/ setupMatrix setupRow.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Oct 15, 2024
1 parent 325855f commit 9dc29ff
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,20 @@
* Copyright (c) 2024 Digital Bazaar, Inc. All rights reserved.
*/

export function setupMatrix(match) {
// this will tell the report
// to make an interop matrix with this suite
this.matrix = true;
this.report = true;
this.implemented = [...match.keys()];
this.rowLabel = 'Test Name';
this.columnLabel = 'Implementer';
}

export function setupRow() {
// append test meta data to the it/test this.
this.currentTest.cell = {
columnId: this.currentTest.parent.title,
rowId: this.currentTest.title
};
}
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ function InteropReporter(runner, options = {}) {
});
}

export {setupMatrix} from './helpers.js';
export * as helpers from './helpers.js';
export default InteropReporter;

0 comments on commit 9dc29ff

Please sign in to comment.