File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 11/*!
22 * Copyright (c) 2019-2024 Digital Bazaar, Inc. All rights reserved.
33 */
4- import * as vc from '../lib/index.js' ;
5- import { createDiSuites , createSdSuites } from './helpers.js' ;
64import { createSkewedTimeStamp , issueCredential } from './helpers.js' ;
75import chai from 'chai' ;
86import { documentLoader } from './testDocumentLoader.js' ;
7+ import { createSuites } from './helpers.js' ;
98import { setupSuites } from './mocks/suites.js' ;
109import { v4 as uuid } from 'uuid' ;
1110import { versionedCredentials } from './mocks/credential.js' ;
@@ -82,8 +81,21 @@ function _runSuite({
8281 return Reflect . get ( ...arguments ) ;
8382 }
8483 } ;
85- const signer = new Proxy ( keyPair . signer ( ) , stubSignerId ) ;
86- const suites = derived ? createSdSuites ( { signer, cryptosuite} ) : createDiSuites ( { signer, cryptosuite} ) ;
84+ const stubSigner = {
85+ get ( target , prop ) {
86+ if ( prop === 'signer' ) {
87+ return ( ) => new Proxy ( target . signer ( ) , stubSignerId ) ;
88+ }
89+ return Reflect . get ( ...arguments ) ;
90+ }
91+ } ;
92+ const proxyKeyPair = new Proxy ( keyPair , stubSigner ) ;
93+ const suites = createSuites ( {
94+ keyPair : proxyKeyPair ,
95+ cryptosuite,
96+ suiteName,
97+ derived
98+ } ) ;
8799 let error ;
88100 try {
89101 await issueCredential ( {
You can’t perform that action at this time.
0 commit comments