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

Function defineTestVariables

src/aria/listbox/listbox.spec.ts:121–127  ·  view source on GitHub ↗
(fixture: ComponentFixture<unknown>)

Source from the content-addressed store, hash-verified

119 }
120
121 function defineTestVariables(fixture: ComponentFixture<unknown>) {
122 listboxDebugElement = fixture.debugElement.query(By.directive(Listbox));
123 optionDebugElements = fixture.debugElement.queryAll(By.directive(Option));
124 listboxInstance = listboxDebugElement.injector.get<Listbox<unknown>>(Listbox);
125 listboxElement = listboxDebugElement.nativeElement;
126 optionElements = optionDebugElements.map(option => option.nativeElement);
127 }
128
129 afterEach(async () => await runAccessibilityChecks(listboxElement));
130

Callers 3

setupListboxFunction · 0.70
setupDefaultListboxFunction · 0.70
listbox.spec.tsFile · 0.70

Calls 1

getMethod · 0.65

Tested by

no test coverage detected