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

Function createTestComponent

src/cdk/table/text-column.spec.ts:85–97  ·  view source on GitHub ↗
(options: TextColumnOptions<any>)

Source from the content-addressed store, hash-verified

83
84 describe('with options', () => {
85 function createTestComponent(options: TextColumnOptions<any>) {
86 // Reset the previously configured testing module to be able set new providers.
87 // The testing module has been initialized in the root describe group for the ripples.
88 TestBed.resetTestingModule();
89 TestBed.configureTestingModule({
90 providers: [{provide: TEXT_COLUMN_OPTIONS, useValue: options}],
91 });
92
93 fixture = TestBed.createComponent(BasicTextColumnApp);
94 fixture.detectChanges();
95
96 tableElement = fixture.nativeElement.querySelector('.cdk-table');
97 }
98
99 it('should be able to provide a header text transformation', () => {
100 const defaultHeaderTextTransform = (name: string) => `${name}!`;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected