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

Need functionality to stop test suite when a test is failing #10129

Closed
janostgren opened this issue Jun 5, 2020 · 9 comments
Closed

Need functionality to stop test suite when a test is failing #10129

janostgren opened this issue Jun 5, 2020 · 9 comments

Comments

@janostgren
Copy link

We need a way to stop a Jest test suite after first failing test. Our test suites are flows and test are steps dependent on the previous step. I know that this is not best practices for unit testing but our use case is different.
We are using Jest Circus so we are getting events about all test in our customized Jest environment class. We want a method to trigger stop of the test suite and mark the remain test as skiped or failed.

Motivation

This is the only missing functionality we are missing in Jest to run our end 2 end test suites.

@SimenB
Copy link
Member

SimenB commented Jun 5, 2020

Isn't this --bail?

@janostgren
Copy link
Author

janostgren commented Jun 5, 2020 via email

@CodingJabber
Copy link

@gg-hsi
Copy link

gg-hsi commented Jun 18, 2020

The bail option is working only for test suites (aka describe) not for tests.
Any plan to fix this?

@arlowhite
Copy link

This jasmine-fail-fast hack works: #2867 (comment)

@sam-barker
Copy link

Any update on this without having to use the Jasmine fail fast hack?

@github-actions
Copy link

This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Apr 15, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@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 Jun 15, 2022
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

6 participants