From 10242438fc4a338d4f36265e058303235a603da6 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Fri, 28 Jun 2024 21:50:00 +0000 Subject: [PATCH] stub verify data to so created is not deleted. --- tests/setup.js | 10 +++------- tests/vc-generator/generators.js | 8 ++++++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/setup.js b/tests/setup.js index abbcd3a..614793e 100644 --- a/tests/setup.js +++ b/tests/setup.js @@ -5,7 +5,8 @@ import { allowUnsafeCanonize, invalidCborEncoding, - invalidStringEncoding + invalidStringEncoding, + passCreated } from './vc-generator/generators.js'; import { deriveCredentials, @@ -192,12 +193,7 @@ export async function verifySetup({credentials, keyTypes, suite}) { keys, vectors: transformVectors(subjectNestedObjects), suiteName: suite, - initialParams: { - // FIXME while created is not recommended for bbs it should be in - // the disclosed VC too. - selectiveSuite: null - }, - generators: [invalidCreated] + generators: [invalidCreated, passCreated] }); return { base, diff --git a/tests/vc-generator/generators.js b/tests/vc-generator/generators.js index e2ddf7a..985e757 100644 --- a/tests/vc-generator/generators.js +++ b/tests/vc-generator/generators.js @@ -13,6 +13,14 @@ export function allowUnsafeCanonize({suite, selectiveSuite, ...args}) { return {...args, suite, selectiveSuite}; } +export function passCreated({suite, ...args}) { + suite._cryptosuite = stubMethods({ + object: suite._cryptosuite, + stubs: {createVerifyData: stubs.stubVerifyData({deleteCreated: false})}, + }); + return {...args, suite}; +} + export function invalidStringEncoding({suite, selectiveSuite, ...args}) { suite._cryptosuite = stubMethods({ object: suite._cryptosuite,