Adds timed setup/teardown hooks, introduces Bash code coverage with reports and thresholds, and fixes bench tests.
✨ Improvements
- Display
set_up_before_scriptandtear_down_after_scriptexecution with duration- Shows "Running hook_name... done (Xs)" during test runs
- Helps identify slow setup/teardown operations
- Suppressed in failures-only and parallel modes
- Add code coverage tracking with
--coverageflag- Tracks line coverage using Bash DEBUG trap mechanism
- Configurable source paths via
--coverage-paths(default:src/) - Configurable exclusions via
--coverage-exclude(default:tests/*,vendor/*,*_test.sh,*Test.sh) - LCOV format output via
--coverage-report(default:coverage/lcov.info) - HTML coverage report via
--coverage-report-html <dir>with line-by-line highlighting - Minimum coverage threshold via
--coverage-min(fails if below) - Console-only mode with
--no-coverage-report - Color-coded console output with configurable thresholds (50%/80%)
🐛 Bug Fixes
- Fix
benchcommand not working in standalone/installed bashunit (missingbenchmark.shin build) - Fix
helper::get_latest_tagreturning version with^{}suffix from annotated git tags
👥 Contributors
Checksum
SHA256:
a674f92ff2e44b905a0bcb00944ac35e89cdce0d2a6074c2eb829976116b0c9d
Full Changelog: 0.30.0...0.31.0