-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. added .isEvent property (to distinguish between legacy 'success' and any sub-events) 2. added property .event that is either 'success' or the named sub-event 3. the api for sub-events is a context named either 'on' or 'events' ('events' is transformed into 'on') 1. updated addVow to look at the vow.binding.context.event instead of 'success' 2. if the sub-event is 'error' there is no need to listen for the topics error event again 3. Hooked EventEmitter.prototype.emit so I can capture events that happen before addVow is run. 4. Updated the vow calling params so if we have a known emitted event I don't change the calling structure (i.e. add a null error) 1. Throw if a sub-event or 'on' context has a topic 2. Sub-events can inherit from EventEmitter 3. changed 'success' to ctx.event 4. execute new context even if the event has already fired Added basic tests to demonstrate "Vows with sub events" Fixes #109
- Loading branch information
Showing
5 changed files
with
192 additions
and
158 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.