Release 0.36.0
New features
Show captured output on failures
When an assertion fails, anything the test printed to stdout/stderr was previously swallowed. The new --show-output flag (or BASHUNIT_SHOW_OUTPUT=true) surfaces that captured output right next to the failure, so you no longer have to add echo calls to debug a red test (#637):
bashunit --show-output tests/Install from npm
bashunit is now published to the npm registry, so it can be installed and pinned like any other dev dependency (#244):
npm install -g bashunit
# or per-project
npm install --save-dev bashunitFunction and branch coverage in LCOV
LCOV reports now include function records (FN, FNDA, FNF, FNH) and branch records (BRDA, BRF, BRH) for if/elif/else chains and case patterns. That means tools like genhtml, Codecov and Coveralls can display per-function and per-branch coverage, not just line coverage (see adrs/adr-007-branch-coverage-mvp.md).
Richer text coverage reports
Two new opt-in blocks make the plain-text coverage report far more actionable:
BASHUNIT_COVERAGE_SHOW_FUNCTIONS=true bashunit --coverage tests/BASHUNIT_COVERAGE_SHOW_UNCOVERED=true bashunit --coverage tests/SHOW_FUNCTIONS adds a per-function coverage breakdown; SHOW_UNCOVERED lists the exact lines still missing coverage, with consecutive line numbers compressed into ranges.
New helpers
bashunit::env::supports_color— detect whether the current terminal supports color.bashunit::io::clear_screen— portable screen clear (#247).
Changes
- Docs now live in their own npm workspace under
docs/(usecd docs && npm ciormake docs/install). - The pre-commit hook skips the test suite when no shell files are staged, speeding up docs-only commits.
- All ANSI escapes route through
_BASHUNIT_COLOR_*constants for consistent theming (#247).
Performance
- Faster coverage report generation: a single-pass file scan, native bash regex, and cached file stats (#636).
Bug fixes
bashunit upgradenow exits non-zero with a clear error when the download fails, instead of printing a false success message.
See the full changelog for 0.36.0 on GitHub.