(compType: Type<T>, moduleType: Type<any>)
| 129 | } |
| 130 | |
| 131 | function createComp<T>(compType: Type<T>, moduleType: Type<any>): ComponentFixture<T> { |
| 132 | const componentDef = (compType as any).ɵcmp; |
| 133 | if (componentDef) { |
| 134 | // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we |
| 135 | // may face a problem where previously compiled defs available to a given |
| 136 | // Component/Directive are cached in TView and may become stale (in case any of these defs |
| 137 | // gets recompiled). In order to avoid this problem, we force fresh TView to be created. |
| 138 | componentDef.TView = null; |
| 139 | } |
| 140 | |
| 141 | createModule(moduleType, injector); |
| 142 | |
| 143 | return TestBed.createComponent(compType); |
| 144 | } |
| 145 | |
| 146 | describe('errors', () => { |
| 147 | it('should error when exporting a directive that was neither declared nor imported', () => { |
no test coverage detected
searching dependent graphs…