From ff30029a30bf7d87285e02611e0135e01d22e3b7 Mon Sep 17 00:00:00 2001 From: Niels Klomp Date: Mon, 4 Sep 2023 22:16:57 +0200 Subject: [PATCH] chore: update Mattr test to perform some tests on the VC using the Credential Mapper and to also check the format --- packages/client/lib/__tests__/MattrE2E.spec.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/client/lib/__tests__/MattrE2E.spec.test.ts b/packages/client/lib/__tests__/MattrE2E.spec.test.ts index 2ed90e00..3f90c945 100644 --- a/packages/client/lib/__tests__/MattrE2E.spec.test.ts +++ b/packages/client/lib/__tests__/MattrE2E.spec.test.ts @@ -1,3 +1,4 @@ +import { CredentialMapper } from '@sphereon/ssi-types' import { fetch } from 'cross-fetch'; import { Alg, AuthzFlowType, Jwt } from '@sphereon/oid4vci-common'; import { importJWK, JWK, SignJWT } from 'jose'; @@ -50,6 +51,9 @@ describe('OID4VCI-Client using Mattr issuer should', () => { } }) expect(credentialResponse.credential).toBeDefined() + const wrappedVC = CredentialMapper.toWrappedVerifiableCredential(credentialResponse.credential!) + expect(format.startsWith(wrappedVC.format)).toEqual(true) + } it(