Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should increment positively if DIRECTION is DOWN and NAVIGATING DOWN', () => {
component.direction = 'down';
fixture.detectChanges();
const display = fixture.debugElement.query(By.css('.display'));
display.nativeElement.dispatchEvent(
EventGenerator.keyDown(Key.Enter),
);
const itemContainer = fixture.debugElement.query(By.css('.item-list-container'));
itemContainer.nativeElement.dispatchEvent(
EventGenerator.keyDown(Key.ArrowDown),
);
expect(uiSuggest.activeIndex).toEqual(1);
});