Skip to content

Commit

Permalink
add missing helper functions
Browse files Browse the repository at this point in the history
Signed-off-by: PatStLouis <[email protected]>
  • Loading branch information
PatStLouis committed Nov 19, 2024
1 parent 8a4ce97 commit 2cb29e2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/90-algorithms-jcs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
isValidUtf8,
setupReportableTestSuite,
setupRow
} from '../helpers.js';
} from './helpers.js';
import chai from 'chai';
import {endpoints} from 'vc-test-suite-implementations';

Expand Down
12 changes: 12 additions & 0 deletions tests/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * as bs64 from 'base64url-universal';
import {createRequire} from 'node:module';
import {isUtf8} from 'node:buffer';
import {klona} from 'klona';
import {readFileSync} from 'fs';
import {v4 as uuidv4} from 'uuid';

export const require = createRequire(import.meta.url);
Expand Down Expand Up @@ -35,6 +36,9 @@ export const ISOTimeStamp = ({date = new Date()} = {}) => {
*
* @returns {Promise<object>} The resulting issuance result.
*/

export const config = JSON.parse(readFileSync('./config/runner.json'));

export const createInitialVc = async ({
issuer,
vc,
Expand Down Expand Up @@ -270,3 +274,11 @@ export function createValidCredential(version = 2) {
}
return credential;
}

export function setupRow() {
// append test meta data to the it/test this.
this.currentTest.cell = {
columnId: this.currentTest.parent.title,
rowId: this.currentTest.title
};
}

0 comments on commit 2cb29e2

Please sign in to comment.