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

Function createVirtualScroll

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

Source from the content-addressed store, hash-verified

1999
2000 describe('virtual scrolling', () => {
2001 async function createVirtualScroll<T>(component: Type<T>): Promise<{
2002 fixture: ComponentFixture<T>;
2003 table: HTMLTableElement;
2004 }> {
2005 const fixture = TestBed.createComponent(component);
2006
2007 // Init logic copied from the virtual scroll tests.
2008 fixture.detectChanges();
2009 await fixture.whenStable();
2010 fixture.detectChanges();
2011 await fixture.whenStable();
2012
2013 await new Promise(resolve => requestAnimationFrame(resolve));
2014 await fixture.whenStable();
2015 fixture.detectChanges();
2016
2017 return {
2018 fixture,
2019 table: fixture.nativeElement.querySelector('table'),
2020 };
2021 }
2022
2023 async function triggerScroll(
2024 fixture: ComponentFixture<{viewport: CdkVirtualScrollViewport}>,

Callers 1

table.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected