mirror of
https://github.com/sstephenson/bats.git
synced 2024-11-17 11:42:33 +01:00
Add setup and teardown to the top.
parent
805890a95b
commit
24847a0f8b
|
@ -1,4 +1,4 @@
|
||||||
In order to better understand what you can and can't do outside of `test` blocks, it's important to know how Bats processes test files. Below is a walkthrough by Sam:
|
In order to better understand what you can and can't do outside of `@test` blocks and `setup` or `teardown` functions, it's important to know how Bats processes test files. Below is a walkthrough by Sam:
|
||||||
|
|
||||||
1. First, each test file is preprocessed. This essentially amounts to replacing lines like `@test "first test" {` with `test_first_test() { bats_begin_test "first test";`, i.e. turning each `@test` block into a test function.
|
1. First, each test file is preprocessed. This essentially amounts to replacing lines like `@test "first test" {` with `test_first_test() { bats_begin_test "first test";`, i.e. turning each `@test` block into a test function.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user