Suppose I have this test, copy-pasted from README.md and changed so that it fails.
#!/usr/bin/env bats
@test "addition using bc" {
result="$(echo 2+2 | bc)"
[ "$result" -eq 5 ]
}
When a test fails, I would really prefer to have the test fixture what happened. Here it will just tell me that the line [ "$result -eq 5 ] failed, but won't tell me what the content of $result is.
This makes bats test failures more difficult to debug than necessary. I mean yes, test are useful when they pass, but they are really useful when they are helpful when they fail.
Any plans to make things be different, or do you expect people to roll their own or use a separate xUnit-like library?
Suppose I have this test, copy-pasted from
README.mdand changed so that it fails.When a test fails, I would really prefer to have the test fixture what happened. Here it will just tell me that the line
[ "$result -eq 5 ]failed, but won't tell me what the content of$resultis.This makes bats test failures more difficult to debug than necessary. I mean yes, test are useful when they pass, but they are really useful when they are helpful when they fail.
Any plans to make things be different, or do you expect people to roll their own or use a separate xUnit-like library?