Created
November 5, 2012 22:03
-
-
Save dyoder/4020683 to your computer and use it in GitHub Desktop.
Test for cascading events ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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