mirror of
https://github.com/sstephenson/bats.git
synced 2026-02-25 09:18:10 +01:00
Test for failing tests
This commit is contained in:
@@ -26,3 +26,10 @@ FIXTURE_ROOT="$BATS_TEST_DIRNAME/fixtures"
|
||||
[ ${lines[0]} = "1..1" ]
|
||||
[ ${lines[1]} = "ok 1 a passing test" ]
|
||||
}
|
||||
|
||||
@test "one failing test" {
|
||||
run bats "$FIXTURE_ROOT/one_failing.bats"
|
||||
[ $status -eq 1 ]
|
||||
[ ${lines[0]} = "1..1" ]
|
||||
[ ${lines[1]} = "not ok 1 a failing test" ]
|
||||
}
|
||||
|
||||
3
test/fixtures/one_failing.bats
vendored
Normal file
3
test/fixtures/one_failing.bats
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
@test "a failing test" {
|
||||
false
|
||||
}
|
||||
Reference in New Issue
Block a user