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

Added 'suite.wasDefined' and 'test.added' event emissions from Context #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ghost
Copy link

@ghost ghost commented Jul 25, 2016

@brianium, here's the previously-discussed pull request for a couple new event emissions from core to aid in the Scenarios plugin implementation. Please let me know if there are any issues or if anything further is needed...thanks!

Josh

@ezzatron
Copy link

Thanks for the PR! I've just recently come on as a maintainer here, and I might be able to help out in getting this merged.

Could you help me out with a brief description of what the new events are, and specifically how they differ from, or relate to, any similar existing events? I'm not familiar with the Scenarios plugin, so this would really help me to understand the PR better. A couple of tests would help to convey the intent also.

Cheers!

@ghost
Copy link
Author

ghost commented Jul 29, 2016

Sure thing! My apologies...even though the changes are fairly trivial, tests should most certainly have been added before opening the PR. The changes include a new 'suite.wasDefined' event fired immediately after a suite's definition function is executed. I believe there was a pre-existing 'suite.define' event that fired immediately before the suite definition function was executed. Also included is a new 'test.added' event that fires when a test is added to the currently-active suite. I don't believe this new event has any related pre-existing events. Both of these new events are used to capture information for the Scenarios plugin to be able to tell when the context is in a proper state for a scenario to be added (scenarios are always added to the last-added test as defined by a call to the it() function). Each time the plugin is pinged with a 'suite.define' or 'suite.wasDefined', the plugin is put into a state where any attempt to add a scenario throws an error as scenarios are bound to tests, not suites. A ping with the 'test.added' event puts the plugin into a scenario-accepting state.

Feel free to check out the Scenarios plugin repo for more details and let me know if there are any further Q's, will be happy to answer!

Thanks!
Josh

@ezzatron
Copy link

Ah, okay, so this is to support peridot-php/peridot#183?

@ghost
Copy link
Author

ghost commented Jul 29, 2016

Correct

@ghost
Copy link
Author

ghost commented Aug 7, 2016

Just wanted to do a quick follow-up here...if anything further is needed from me, just let me know just let me know and I'll get back to you ASAP!

@ezzatron
Copy link

ezzatron commented Aug 7, 2016

We're tackling a bit of a backlog and some technical issues with our release process at the moment, sorry. I haven't forgotten about this PR, though.

@ghost
Copy link
Author

ghost commented Aug 9, 2016

No worries at all, thanks for the quick reply!

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

Successfully merging this pull request may close these issues.

1 participant