Skip to content

Instantly share code, notes, and snippets.

@dyoder
Created November 5, 2012 22:03
Show Gist options
  • Save dyoder/4020683 to your computer and use it in GitHub Desktop.
Save dyoder/4020683 to your computer and use it in GitHub Desktop.
Test for cascading events ...
testify "A bus with cascading events fires them all", (test) ->
bus = new Bus
flag = false
bus.on "foo", ->
bus.event "bar"
process.nextTick ->
test.assert.ok flag
test.done()
bus.on "foo", ->
bus.on "bar", -> flag = true
bus.event "foo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment