Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Event Testing #116

Open
rsandor opened this issue Jul 10, 2014 · 0 comments
Open

Better Event Testing #116

rsandor opened this issue Jul 10, 2014 · 0 comments
Labels
Milestone

Comments

@rsandor
Copy link
Collaborator

rsandor commented Jul 10, 2014

To test events we currently have to use a multi-step process:

  1. Register a "failure" timeout that will assert false when the tested event fails to trigger (usually happens after 1 second)
  2. Register a success handler to the object that should trigger the event that cancels the failure timeout and calls done()
  3. Perform the action that should trigger an event

While this is a neat way to do things, it's rather verbose. It would be nice if we could add a couple of helper methods for doing just this. One solution that springs to mind is to create helpers for the failure timeout and the success callback, or we could just roll them all up into one thing.

Either way, very open to suggestions on this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant