test(typeahead): add tests for keypress handling