Is there a way to check Java keyboard event handlers (for keypress , keyup , keydown )?
I know that I can declare event handlers as follows:
function keyUpEvHandler(e) { ...
and then just run this function in unit tests, but I will have to prepare the event argument object the same as when pressing the actual key:
var e = {keyCode: 70, ...};
Is there a way to raise this event and pass key code as an argument or something similar? Unfortunately jQuery trigger () docs does not apply to keyboard events.
jquery events unit-testing qunit keyboard-events
Rayell
source share