This repository has been archived by the owner on Apr 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 517
exit on first failure? #135
Comments
Bats can't do this yet. Though, adding the option would be certainly useful. |
This really blows that bats can't do this. I'm willing to do the work if someone could point me in the right direction. |
Here is a workaround: #!/usr/bin/env bats
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
}
@test "foo" {
true
}
@test "foo2" {
false
}
@test "foo3" {
true
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
} |
Excellent! Thank you. |
Wow; what a simple solution. Here I was killing the parent process and having a tough time of it. Thank you! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I haven't been able to find documentation on this yet (hopefully I just overlooked it) but I'd like to have
bats
exit on first failure when being invoked asbats /path/to/tests/*.bats
.Is this possible?
The text was updated successfully, but these errors were encountered: