Invoke dbl click on test


#1

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', =>
    ..do something..

How do I invoke that @on double click?


#2

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'
expect(object)...