MCPcopy Create free account
hub / github.com/angular/components / createComponent

Function createComponent

src/material/stepper/stepper.spec.ts:1823–1843  ·  view source on GitHub ↗
(
  component: Type<T>,
  providers: Provider[] = [],
  encapsulation?: ViewEncapsulation,
)

Source from the content-addressed store, hash-verified

1821}
1822
1823function 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: `

Callers 3

createBasicStepperFunction · 0.70
stepper.spec.tsFile · 0.70
createFixtureFunction · 0.70

Calls 1

Tested by

no test coverage detected