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

Function createVirtualScroll

src/cdk/table/table.spec.ts:2042–2062  ·  view source on GitHub ↗
(component: Type<T>)

Source from the content-addressed store, hash-verified

2040
2041 describe('virtual scrolling', () => {
2042 async function createVirtualScroll<T>(component: Type<T>): Promise<{
2043 fixture: ComponentFixture<T>;
2044 table: HTMLTableElement;
2045 }> {
2046 const fixture = TestBed.createComponent(component);
2047
2048 // Init logic copied from the virtual scroll tests.
2049 fixture.detectChanges();
2050 await fixture.whenStable();
2051 fixture.detectChanges();
2052 await fixture.whenStable();
2053
2054 await new Promise(resolve => requestAnimationFrame(resolve));
2055 await fixture.whenStable();
2056 fixture.detectChanges();
2057
2058 return {
2059 fixture,
2060 table: fixture.nativeElement.querySelector('table'),
2061 };
2062 }
2063
2064 async function triggerScroll(
2065 fixture: ComponentFixture<{viewport: CdkVirtualScrollViewport}>,

Callers 1

table.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected