( component: Type<T>, providers: Provider[] = [], encapsulation?: ViewEncapsulation, )
| 1821 | } |
| 1822 | |
| 1823 | function createComponent<T>( |
| 1824 | component: Type<T>, |
| 1825 | providers: Provider[] = [], |
| 1826 | encapsulation?: ViewEncapsulation, |
| 1827 | ): ComponentFixture<T> { |
| 1828 | TestBed.configureTestingModule({ |
| 1829 | providers: [ |
| 1830 | provideFakeDirectionality(dir), |
| 1831 | {provide: MATERIAL_ANIMATIONS, useValue: {animationsDisabled: true}}, |
| 1832 | ...providers, |
| 1833 | ], |
| 1834 | }); |
| 1835 | |
| 1836 | if (encapsulation != null) { |
| 1837 | TestBed.overrideComponent(component, { |
| 1838 | set: {encapsulation}, |
| 1839 | }); |
| 1840 | } |
| 1841 | |
| 1842 | return TestBed.createComponent<T>(component); |
| 1843 | } |
| 1844 | |
| 1845 | @Component({ |
| 1846 | template: ` |
no test coverage detected