Created
October 18, 2012 17:32
-
-
Save konsumer/3913563 to your computer and use it in GitHub Desktop.
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
TEST=event node test/lib/test.js | |
Event | |
instances | |
✓ should be an instance of Event | |
✓ should have eventHandlers array | |
✓ should have firedEvents array | |
✓ should have addHandler method | |
✓ should have removeHandler method | |
✓ should have fire method | |
addHandler() | |
✓ should set the handler on the eventHandlers array | |
✓ should return a numeric id of the handler in the eventHandlers array | |
removeHandler() | |
✓ should return true if it removed a handler | |
✓ should return false if it didn't remove a handler | |
✓ should remove a handler on the eventHandlers array given a handler id | |
✓ should remove a handler on the eventHandlers array given a handler | |
✓ should reduce the length of the eventHandlers array | |
fire() | |
✓ should return this. | |
✓ should call every function on the eventHandlers array. | |
✓ should pass args along to the handlers | |
✓ doesn't automatically populate firedEvents | |
✓ adds args to firedEvents if args has a 'save' property that's true. | |
✔ 18 tests complete (24 ms) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment