File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 44 * SPDX-License-Identifier: LicenseRef-w3c-3-clause-bsd-license-2008 OR LicenseRef-w3c-test-suite-license-2023
55 */
66
7- import { addPerTestMetadata , setupMatrix } from './helpers.js' ;
7+ import * as allure from 'allure-js-commons' ;
8+ import { addJsonAttachment , addPerTestMetadata , setupMatrix } from './helpers.js' ;
89import assert from 'node:assert/strict' ;
910import chai from 'chai' ;
11+ import { ContentType } from 'allure-js-commons' ;
1012import { createLocalVp } from './data-generator.js' ;
1113import { createRequire } from 'module' ;
1214import { filterByTag } from 'vc-test-suite-implementations' ;
@@ -32,6 +34,10 @@ describe('Types', function() {
3234 it ( 'Verifiable credentials MUST contain a type property with an ' +
3335 'associated value.' , async function ( ) {
3436 this . test . link = `https://w3c.github.io/vc-data-model/#types:~:text=Verifiable%20credentials%20and%20verifiable%20presentations%20MUST%20contain%20a%20type%20property%20with%20an%20associated%20value.` ;
37+ await addJsonAttachment (
38+ 'credential-no-type-fail.json' ,
39+ require ( './input/credential-no-type-fail.json' )
40+ ) ;
3541 await assert . rejects (
3642 endpoints . issue ( require ( './input/credential-no-type-fail.json' ) ) ,
3743 { name : 'HTTPError' } ,
Original file line number Diff line number Diff line change 1+ import * as allure from 'allure-js-commons' ;
2+ import { ContentType } from 'allure-js-commons' ;
3+
14export function setupMatrix ( match ) {
25 // this will tell the report
36 // to make an interop matrix with this suite
@@ -36,3 +39,11 @@ export function extractIfEnveloped(input) {
3639 return input ;
3740 }
3841}
42+ export async function addJsonAttachment ( fileName , content ) {
43+ // append test meta data to the it/test this.
44+ await allure . attachment (
45+ fileName ,
46+ content ,
47+ ContentType . JSON
48+ ) ;
49+ }
You can’t perform that action at this time.
0 commit comments