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

fix(beforeAll): fix issue 190 when parent before_all throws #192

Merged
merged 27 commits into from
May 20, 2017

Conversation

BrainCrumbz
Copy link
Collaborator

@BrainCrumbz BrainCrumbz commented May 11, 2017

Purposes of this current PR are, in general: to fail an example when one of the hooks throws unexpectedly, and to avoid executing an example body when one of the beforeAll/before hooks throws. More in detail:

  1. Fail example when one of beforeAll/before/act/after/afterAll throws
  2. Don't execute before/act/example/after when current/ancestor beforeAll throws
  3. Don't execute act/example when current/ancestor before throws
  4. Keep executing example when current/ancestor act throws

All that, holding for async versions as well.


Initial description

This PR tracks work-in-progress of fixing issue #190 , as well as other possible problems happening when a context-/method-level before or beforeEach or beforeAll throws and subsequent examples should not run and result as failures.

@GiuseppePiscopo
Copy link
Collaborator

GiuseppePiscopo commented May 16, 2017

@amirrajan it seems like changes are needed also w.r.t. before current implementation. At the moment, when a parent or same-context before fails, example body is run anyway. If instead we keep consistent with recent requirement changes in beforeAll, that should not run instead.

Should we just make needed changes in this same PR?

EDIT: Also, probably the same thing should then happen for act.

Copy link
Collaborator

@amirrajan amirrajan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@amirrajan amirrajan merged commit 8dcc43a into master May 20, 2017
@GiuseppePiscopo GiuseppePiscopo deleted the fix/issue-190-before-all-throw branch May 23, 2017 00:13
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.

3 participants