File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed
consumption/src/modules/openid4vc/local Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 1+ /* eslint-disable no-console */
12import { AgentDependencies } from "@credo-ts/core" ;
23import { EventEmitter } from "events" ;
34import { fetch as undiciFetch } from "undici" ;
@@ -9,7 +10,22 @@ export const agentDependencies: AgentDependencies = {
910 FileSystem : EnmeshedHolderFileSystem ,
1011 // eslint-disable-next-line @typescript-eslint/naming-convention
1112 EventEmitterClass : EventEmitter ,
12- fetch : undiciFetch as typeof fetch ,
13+ fetch : ( async ( input , init ) => {
14+ console . log ( "############### agentDependencies-fetch-input #################" , input ) ;
15+ console . log ( "############### agentDependencies-fetch-init #################" , init ) ;
16+
17+ try {
18+ const response = await undiciFetch ( input as any , init as any ) ;
19+
20+ console . log ( "############### agentDependencies-fetch-response #################" , response ) ;
21+
22+ return response ;
23+ } catch ( error ) {
24+ console . error ( "############### agentDependencies-fetch-error #################" , error ) ;
25+ console . error ( "############### agentDependencies-fetch-error-stack #################" , ( error as any ) . stack ) ;
26+ throw error ;
27+ }
28+ } ) as typeof fetch ,
1329 // eslint-disable-next-line @typescript-eslint/naming-convention
1430 WebSocketClass : webSocket
1531} ;
Original file line number Diff line number Diff line change @@ -22,16 +22,9 @@ beforeAll(async () => {
2222 "Content-Type" : "application/json" // eslint-disable-line @typescript-eslint/naming-convention
2323 }
2424 } ) ;
25- let healthCheckResult = await axiosInstance . get ( "/health" ) ;
26- while ( healthCheckResult . status !== 200 ) {
27- await new Promise ( ( resolve ) => setTimeout ( resolve , 1000 ) ) ;
28- healthCheckResult = await axiosInstance . get ( "/health" ) ;
29- }
3025} , 120000 ) ;
3126
3227afterAll ( async ( ) => {
33- const healthCheckResult = await axiosInstance . get ( "/health" ) ;
34- console . log ( healthCheckResult ) ; // eslint-disable-line no-console
3528 await runtimeServiceProvider . stop ( ) ;
3629} ) ;
3730
You can’t perform that action at this time.
0 commit comments