-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Way to emit events in test code that is compatible with propagating-hammerjs #2
Comments
The closer to hammer.js the better. Best would be if this library wouldn't be necessary at all ;). This is an interesting case, so far I hadn't used I've added some code overriding hammers |
Yes. That fix allowed me to remove the extra btw, I was using Is there a better way to do this? Does hammerjs expose an interface (other than |
Ok great that it works. I'm not sure which tests you mean, at least |
I don't know what is the preferred way to test touch events with hammer. I suppose the "right" way is to create real DOM events and fire them via real DOM event handlers attached to real DOM elements. But that's not so trivial. |
I started using
propagating-hammerjs
which works fine for my app but broke my tests. I realized I could fix my failing tests by emitting an additional event before each simulated event with something like the following:I'm curious if this is the recommended way to simulate events in a
propagating-hammerjs
compatible way? Or is there a better way to simulate events that will work out of the box? or is there a way thatpropagating-hammerjs
could be improved in such a way that the requisite setup for simulated events will have happened without manually needing to do it?The text was updated successfully, but these errors were encountered: