From 9dc29ff187c70cfc54bb0d473b855a45a78baea6 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 15 Oct 2024 13:25:19 +0000 Subject: [PATCH] Add helpers w/ setupMatrix setupRow. --- lib/helpers.js | 17 +++++++++++++++++ lib/index.js | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/helpers.js b/lib/helpers.js index 4f391f9..b6f7a72 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -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 + }; +} diff --git a/lib/index.js b/lib/index.js index 6f8d98c..ebc4f75 100644 --- a/lib/index.js +++ b/lib/index.js @@ -71,5 +71,5 @@ function InteropReporter(runner, options = {}) { }); } -export {setupMatrix} from './helpers.js'; +export * as helpers from './helpers.js'; export default InteropReporter;