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

Make --bail work on a per-test/describe level #7453

Closed
mixalbl4-127 opened this issue Dec 3, 2018 · 7 comments
Closed

Make --bail work on a per-test/describe level #7453

mixalbl4-127 opened this issue Dec 3, 2018 · 7 comments

Comments

@mixalbl4-127
Copy link

mixalbl4-127 commented Dec 3, 2018

According to documentation https://jestjs.io/docs/en/api#describename-fn, a describe is a test suite.

But --bail is not really working when first test suite fails.
Is there a reason this is still closed?

Originally posted by @santimendoza in #2626 (comment)

Reopen issue please. I can't use "a lot of test files" because of this: #6194 (comment)

@thymikee thymikee changed the title --bail does not work #2 Make --bail work on a per-test/describe level Jan 8, 2019
@thymikee
Copy link
Collaborator

thymikee commented Jan 8, 2019

Maybe it would make sense to introduce a new flag that would work on a per-test (not test file) level?

@unional
Copy link
Contributor

unional commented Jan 15, 2019

I suggest using the same flag.
Is there a use case for bailing specifically at the test suite level and not per-test level?

@SimenB
Copy link
Member

SimenB commented Jan 15, 2019

I agree - if we change we should reuse the old flag. I think that's the expected behavior.

Implementing bail that way should be pretty straight forward at least in circus

@santimendoza
Copy link

santimendoza commented Jan 15, 2019

Seems like they change the documentation to remove the text saying a describe is a test suite. Now it says:

creates a block that groups together several related tests

I think a new flag it's better, since there should be several people using --bail in the way is working right now.

@unional
Copy link
Contributor

unional commented Jan 15, 2019

I think a new flag it's better, since there should be several people using --bail in the way is working right now.

Is there a use case for the current behavior? I can't find a sentence to describe the current behavior that would be sufficiently different than bailing on a per-test basis.

@SimenB
Copy link
Member

SimenB commented Feb 3, 2019

Duplicate of #6527 (implementation wise, although that focuses on hooks, not tests in general)

@SimenB SimenB marked this as a duplicate of #6527 Feb 3, 2019
@SimenB SimenB closed this as completed Feb 3, 2019
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants