Invoke dbl click on test


I’m writing a spec that validates that when I double click something, something happens. How do I invoke an action that I specify from @on?

For example,

class SomeClass
  @on 'dblclick', => something..

How do I invoke that @on double click?


Looking at some official Atom package specs, I found out that you can invoke what you specify from @on by using trigger

object.trigger 'dblclick'