Release 0.32.0
🔧 New features
Auto-discover coverage paths
Coverage now automatically discovers which source files to track based on your test file names. No more manual --coverage-paths configuration needed in most cases.
bash
bashunit --coverage --coverage-paths src/ tests/unit/assert_test.shbash
bashunit --coverage tests/unit/assert_test.sh
# Automatically tracks src/assert.shThe convention maps tests/unit/foo_test.sh to src/foo.sh, making coverage setup effortless for standard project layouts.
Better HTML coverage reports
The HTML coverage report has been improved with better styling and now correctly handles namespaced functions with colons (e.g., bashunit::assert::equals).
Additionally, --coverage-report-html now defaults to coverage/html when no directory is specified:
bash
bashunit --coverage-report-html tests/
# Output goes to coverage/html/Refined hook output display
Hook output now displays with right-aligned timing and a bullet prefix for a cleaner, more consistent look:
Running set_up_before_script... done (2.03s)● set_up_before_script 2.03s🐛 Bug fixes
- Coverage now excludes control flow keywords (
then,else,fi,do,done,esac,;;, case patterns) from line tracking - Coverage HTML report correctly handles namespaced functions with colons
- Coverage data no longer lost when running
coverage_test.shalongside other tests
See the full changelog on GitHub