( beforeInit?: (app: INestApplication) => void, )
| 104 | }); |
| 105 | |
| 106 | async function createApp( |
| 107 | beforeInit?: (app: INestApplication) => void, |
| 108 | ): Promise<INestApplication> { |
| 109 | const app = ( |
| 110 | await Test.createTestingModule({ |
| 111 | imports: [TestModule], |
| 112 | }).compile() |
| 113 | ).createNestApplication(); |
| 114 | |
| 115 | if (beforeInit) { |
| 116 | beforeInit(app); |
| 117 | } |
| 118 | await app.init(); |
| 119 | |
| 120 | return app; |
| 121 | } |
no test coverage detected