Skip to content

Commit d5cd15e

Browse files
committed
docs: update Assertion behavior for web documentation
1 parent 95282b3 commit d5cd15e

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

docs/configuration.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ Force to stop the runner right after encountering one failing test. `false` by d
8585

8686
Similar as using `-S|--stop-on-failure` option on the [command line](/command-line#stop-on-failure).
8787

88+
::: tip Assertion behavior
89+
When an assertion fails within a test, subsequent assertions in the same test are automatically skipped. This matches popular testing libraries default behavior and prevents misleading failures caused by earlier assertion failures.
90+
91+
The `--stop-on-failure` flag is separate – it stops the entire test runner after a failing **test**, while assertion-level stopping happens automatically within each test.
92+
:::
93+
8894
## Show header
8995

9096
> `BASHUNIT_SHOW_HEADER=true|false`

docs/custom-asserts.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
Check the internal functional tests: `tests/functional/custom_asserts_test.sh` ([link](https://github.com/TypedDevs/bashunit/blob/main/tests/functional/custom_asserts_test.sh))
77
:::
88

9+
::: info Assertion behavior
10+
When using the bashunit facade, assertions automatically respect the guard behavior: if a previous assertion in the same test already failed, subsequent assertions are skipped. This matches popular testing libraries default behavior.
11+
:::
12+
913
## assertion_failed
1014
> `bashunit::assertion_failed <expected> <actual> <failure_condition_message?>`
1115

0 commit comments

Comments
 (0)