( moduleDef: TestModuleMetadata, fn?: Function | null, )
| 981 | export function withModule(moduleDef: TestModuleMetadata): InjectSetupWrapper; |
| 982 | export function withModule(moduleDef: TestModuleMetadata, fn: Function): () => any; |
| 983 | export function withModule( |
| 984 | moduleDef: TestModuleMetadata, |
| 985 | fn?: Function | null, |
| 986 | ): (() => any) | InjectSetupWrapper { |
| 987 | if (fn) { |
| 988 | // Not using an arrow function to preserve context passed from call site |
| 989 | return function (this: unknown) { |
| 990 | const testBed = TestBedImpl.INSTANCE; |
| 991 | if (moduleDef) { |
| 992 | testBed.configureTestingModule(moduleDef); |
| 993 | } |
| 994 | return fn.apply(this); |
| 995 | }; |
| 996 | } |
| 997 | return new InjectSetupWrapper(() => moduleDef); |
| 998 | } |
no test coverage detected
searching dependent graphs…