MCPcopy
hub / github.com/angular/components / createComponent

Function createComponent

src/material/datepicker/date-range-input.spec.ts:39–57  ·  view source on GitHub ↗
(component: Type<T>, providers: Provider[] = [])

Source from the content-addressed store, hash-verified

37
38describe('MatDateRangeInput', () => {
39 function createComponent<T>(component: Type<T>, providers: Provider[] = []): ComponentFixture<T> {
40 TestBed.configureTestingModule({
41 imports: [
42 FormsModule,
43 MatDatepickerModule,
44 MatFormFieldModule,
45 MatInputModule,
46 ReactiveFormsModule,
47 component,
48 ],
49 providers: [
50 ...providers,
51 provideNativeDateAdapter(),
52 {provide: MATERIAL_ANIMATIONS, useValue: {animationsDisabled: true}},
53 ],
54 });
55
56 return TestBed.createComponent(component);
57 }
58
59 it('should mirror the input value from the start into the mirror element', () => {
60 const fixture = createComponent(StandardRangePicker);

Callers 1

Calls 1

provideNativeDateAdapterFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…