( component: Type<T>, providers: Provider[] = [], encapsulation?: ViewEncapsulation, )
| 1803 | } |
| 1804 | |
| 1805 | function createComponent<T>( |
| 1806 | component: Type<T>, |
| 1807 | providers: Provider[] = [], |
| 1808 | encapsulation?: ViewEncapsulation, |
| 1809 | ): ComponentFixture<T> { |
| 1810 | TestBed.configureTestingModule({ |
| 1811 | providers: [ |
| 1812 | provideFakeDirectionality(dir), |
| 1813 | {provide: MATERIAL_ANIMATIONS, useValue: {animationsDisabled: true}}, |
| 1814 | ...providers, |
| 1815 | ], |
| 1816 | }); |
| 1817 | |
| 1818 | if (encapsulation != null) { |
| 1819 | TestBed.overrideComponent(component, { |
| 1820 | set: {encapsulation}, |
| 1821 | }); |
| 1822 | } |
| 1823 | |
| 1824 | return TestBed.createComponent<T>(component); |
| 1825 | } |
| 1826 | |
| 1827 | @Component({ |
| 1828 | template: ` |
no test coverage detected
searching dependent graphs…