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

Raise events to allow better external integration #141

Closed
ArtemGovorov opened this issue Nov 6, 2015 · 5 comments
Closed

Raise events to allow better external integration #141

ArtemGovorov opened this issue Nov 6, 2015 · 5 comments

Comments

@ArtemGovorov
Copy link
Contributor

Hey guys, AVA looks promising!

I have started adding AVA support to wallaby.js and so far it looks awesome:

n

I did however have to monkey-patch a couple of functions to get the data I need for the integration. Other testing frameworks, such as Mocha and Jasmine, expose some APIs (in one form or another) to allow external integrations. For example via their reporters one may get an event when a test/hook is about to start and when the test is finished, etc.

While I understand that AVA's idea is to stay simple, I don't think raising a few events would hurt the simplicity much. Would you be ok to raise more events from Runner? Happy to send a PR if you are not opposed to the idea.

@vadimdemedes
Copy link
Contributor

Glad you like AVA!

Could you please provide some examples, what kind of events are you interested in?

@ArtemGovorov
Copy link
Contributor Author

Here are a couple events from Runner I'm interested in:

  • an event before a test starts, passing the Test instance.
  • an event when a test completes, passing the Test instance.

I know there's the test event raised from Runner, it somewhat addresses the second even request, but it would also be great to have a hook property on the Test instance to be able to distinguish between tests and hooks in those events.

@vadimdemedes
Copy link
Contributor

Sounds reasonable to me, I think it'd be great to have this anyway.

@sindresorhus @kevva what do you think?

@sindresorhus
Copy link
Member

Cool! Makes sense. PR welcome.

@novemberborn
Copy link
Member

Let's move the discussion to #1043.

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

No branches or pull requests

4 participants