mirror of
https://github.com/sstephenson/bats.git
synced 2026-02-25 09:18:10 +01:00
Print the outermost, not innermost, failed command
The outermost command—i.e. the line that failed inside the test case function itself—is more likely to be meaningful at a glance than the innermost command, which might be e.g. the implementation of a helper assertion.
This commit is contained in:
@@ -71,7 +71,7 @@ fixtures bats
|
||||
[ "${lines[1]}" = 'not ok 1 failing helper function' ]
|
||||
[ "${lines[2]}" = "# (from function \`failing_helper' in file $RELATIVE_FIXTURE_ROOT/test_helper.bash, line 6," ]
|
||||
[ "${lines[3]}" = "# in test file $RELATIVE_FIXTURE_ROOT/failing_helper.bats, line 5)" ]
|
||||
[ "${lines[4]}" = "# \`false' failed" ]
|
||||
[ "${lines[4]}" = "# \`failing_helper' failed" ]
|
||||
}
|
||||
|
||||
@test "test environments are isolated" {
|
||||
|
||||
Reference in New Issue
Block a user