Hacker News new | ask | show | jobs
by tomeon 2679 days ago
> I don't know how bats works with the @test annotation? That doesn't look like valid shell syntax.

Bats runs the test files through a preprocessor[1] that, among other things, converts each `@test` case into a shell function. E.g. `@test "the doohickey should frob" { ... }` becomes `test_the_doohickey_should_frob() { ... }`.

[1] https://github.com/bats-core/bats-core/blob/master/libexec/b...