Apologies if this is covered elsewhere, struggled to find comprehensive result on search.
I've got a Javascript app that has audio descriptions on mouseover for certain elements. These are implemented using mouseover listeners like so (pseudo-code!)
menuOption.addEventListener("mouseover", function(){
audio.play("menuoption");
});
In my test I've got something like:
spyOn(audio, "play")
menuOption.mouseover()
expect(audio.play.calls.count()).toBe(1);
This mouseover doesn't seem to fire. I'm using jasmine and phantomjs. When I change mouseover to click it works ok so I'm inclined to think my tests are fine and its mouseover thats a problem?