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

Flag to stop after first test failure #48

Closed
sindresorhus opened this issue Sep 10, 2015 · 9 comments
Closed

Flag to stop after first test failure #48

sindresorhus opened this issue Sep 10, 2015 · 9 comments
Labels
enhancement new functionality question

Comments

@sindresorhus
Copy link
Member

From #9 (comment).

Does it makes sense to have this?

--bail, --fail-fast, other?

On that note, any thoughts on failing-fast by default? Any reason you'd want the test to complete before failing? I'm sure there are since test runners usually run to completion. Just useful to have this documented either way.

@vadimdemedes
Copy link
Contributor

Yes, this would be a nice option to have.

I would leave this as an option, because AVA is a tool that enforces writing atomic tests. So, one failing test does not mean that all the other ones will fail too. But as an option, it is going to be useful for sure.

@joakimbeng
Copy link
Contributor

👍

On my own laptop I usually want the tests to fail fast, but in an CI environment I think it's good to run all tests and get a report of what didn't work.

@sindresorhus
Copy link
Member Author

What flag name do you prefer? bikeshedding

@joakimbeng
Copy link
Contributor

I think I prefer --bail as it's in line with other test runners.

@Qix-
Copy link
Contributor

Qix- commented Sep 30, 2015

fail-fast means more to me as a programmer. I'd have no idea what bail meant.

@sindresorhus
Copy link
Member Author

I don't really care what other test runners do. AVA exists because of those. I want something succinct as flag name.

@joakimbeng
Copy link
Contributor

I don't really care what other test runners do

👍 Then I agree with --fail-fast being a better name. Or maybe --abort-on-fail but that's too long to be good...

@arthurvr
Copy link

arthurvr commented Oct 1, 2015

I like fail-fast.

@kevva
Copy link
Contributor

kevva commented Oct 6, 2015

I'd leave it as an option too, although I'm usually hitting ctrl +c whenever I see a fail test locally if there are time consuming tests (like in pageres). But most of the times, the tests are finished before that.

Also, +1 on fail-fast or something like it that makes it's intention clear. bail has never been that obvious to me.

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

No branches or pull requests

6 participants