$BATS_TEST_NAMES
–
Function Names of Test Cases
$BATS_TEST_NAMES
is an array of function names. There’s one item for each test defined in the current bats test
file.
Links
Examples
- Print functions corresponding to your defined tests
1 2 3 4 5 6 7
@test "Example 1" { skip } @test "Example" { echo "Function names: ${BATS_TEST_NAMES[*]}" >&3 }
BashSupport Pro is a shell script IDE with support for bats-core’s $BATS_TEST_NAMES – try it now!