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

What is the best way to test events? #382

Open
marcelomorgado opened this issue May 7, 2019 · 1 comment
Open

What is the best way to test events? #382

marcelomorgado opened this issue May 7, 2019 · 1 comment
Labels
question Further information is requested
Milestone

Comments

@marcelomorgado
Copy link
Contributor

marcelomorgado commented May 7, 2019

Should we keep using mocha done function or should we use some specific tool for that?
Refs:
https://stackoverflow.com/questions/16826352/whats-the-best-way-to-unit-test-an-event-being-emitted-in-nodejs
https://www.npmjs.com/package/chai-events

Extracted from: #369 (comment)

@marcelomorgado marcelomorgado added the question Further information is requested label May 7, 2019
@marcelomorgado marcelomorgado added this to the 0.2.0 release milestone May 7, 2019
@pcowgill
Copy link
Member

pcowgill commented May 7, 2019

Alternatively, we can create our own custom test helper that still uses done() internally but is named something like "assert error listener triggered", etc.

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

No branches or pull requests

2 participants