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

Function createComponent

src/material/autocomplete/autocomplete.spec.ts:58–67  ·  view source on GitHub ↗
(component: Type<T>, providers: Provider[] = [])

Source from the content-addressed store, hash-verified

56describe('MatAutocomplete', () => {
57 // Creates a test component fixture.
58 function createComponent<T>(component: Type<T>, providers: Provider[] = []) {
59 TestBed.configureTestingModule({
60 providers: [
61 ...providers,
62 {provide: MATERIAL_ANIMATIONS, useValue: {animationsDisabled: true}},
63 ],
64 });
65
66 return TestBed.createComponent<T>(component);
67 }
68
69 function getOverlayHost(fixture: ComponentFixture<unknown>): HTMLElement | null {
70 return fixture.nativeElement.querySelector('.cdk-overlay-popover');

Callers 2

createSimpleAutocompleteFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected