( schemaName: string, cid: string, disableHistorical = false, useSubscription = false, timestampField = false, )
| 88 | } |
| 89 | |
| 90 | export async function prepareApp( |
| 91 | schemaName: string, |
| 92 | cid: string, |
| 93 | disableHistorical = false, |
| 94 | useSubscription = false, |
| 95 | timestampField = false, |
| 96 | ): Promise<INestApplication> { |
| 97 | const m = await Test.createTestingModule({ |
| 98 | imports: [ |
| 99 | DbModule.forRoot(), |
| 100 | EventEmitterModule.forRoot(), |
| 101 | mockRegister( |
| 102 | cid, |
| 103 | schemaName, |
| 104 | disableHistorical ? false : 'height', |
| 105 | useSubscription, |
| 106 | timestampField, |
| 107 | ), |
| 108 | ScheduleModule.forRoot(), |
| 109 | CoreModule, |
| 110 | FetchModule, |
| 111 | ], |
| 112 | controllers: [], |
| 113 | }).compile(); |
| 114 | |
| 115 | const app = m.createNestApplication(); |
| 116 | await app.init(); |
| 117 | return app; |
| 118 | } |
no test coverage detected