(fn: () => void | Promise<void>)
| 383 | }); |
| 384 | |
| 385 | function test(fn: () => void | Promise<void>): () => Promise<void> { |
| 386 | return async () => { |
| 387 | const injector = Injector.create({ |
| 388 | providers: [{provide: EnvironmentInjector, useFactory: () => injector}], |
| 389 | }) as EnvironmentInjector; |
| 390 | try { |
| 391 | return await runInInjectionContext(injector, fn); |
| 392 | } finally { |
| 393 | injector.destroy(); |
| 394 | } |
| 395 | }; |
| 396 | } |
no test coverage detected
searching dependent graphs…