MCPcopy Index your code
hub / github.com/angular/components / createComponent

Function createComponent

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

Source from the content-addressed store, hash-verified

1803}
1804
1805function 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: `

Callers 2

stepper.spec.tsFile · 0.70
createFixtureFunction · 0.70

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…